Title: Documentation
Last modified: December 13, 2018

---

# Documentation

 *  Resolved [Jacob N. Breetvelt](https://wordpress.org/support/users/opajaap/)
 * (@opajaap)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/documentation-206/)
 * I am a plugin developer and i used to use
 * `ewww_image_optimizer($file, 4, false, false, false )`
 * I added this code many years ago, and it still works!.
    I am currently reviewing
   code and have 2 questions:
 * 1 – is this still a good function to optimize an image (jpg) file, or are there
   maybe better aternatives?
    2 – where can i find the documentation of this – or
   an alternative – function?

Viewing 1 replies (of 1 total)

 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/documentation-206/#post-10985105)
 * Hi Jacob,
    That is still valid code as you found, and pretty close to the “best
   practice” at this point. At this point, however, I’ve made all the additional
   parameters optional, so you can now just call it like so: `ewww_image_optimizer(
   $file );`
 * While the underlying code might change in the future, I’ve committed to making
   sure that function always works.

Viewing 1 replies (of 1 total)

The topic ‘Documentation’ is closed to new replies.

 * ![](https://ps.w.org/ewww-image-optimizer/assets/icon-256x256.png?rev=1582276)
 * [EWWW Image Optimizer](https://wordpress.org/plugins/ewww-image-optimizer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ewww-image-optimizer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ewww-image-optimizer/)
 * [Active Topics](https://wordpress.org/support/plugin/ewww-image-optimizer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ewww-image-optimizer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ewww-image-optimizer/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * Last activity: [7 years, 5 months ago](https://wordpress.org/support/topic/documentation-206/#post-10985105)
 * Status: resolved