Title: Suboptimal image resizing problem
Last modified: August 20, 2016

---

# Suboptimal image resizing problem

 *  [mondalaci](https://wordpress.org/support/users/mondalaci/)
 * (@mondalaci)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/suboptimal-image-resizing-problem/)
 * Hi Mike,
 * I’ve just used Google PageSpeed Insights for my site which revealed numerous 
   warnings like this:
 * [https://lh5.googleusercontent.com/-MvaubvtLHmM/UAySJWkLYbI/AAAAAAAAAEo/I2E_2LzTV44/IMG_0879.JPG?imgmax=640](https://lh5.googleusercontent.com/-MvaubvtLHmM/UAySJWkLYbI/AAAAAAAAAEo/I2E_2LzTV44/IMG_0879.JPG?imgmax=640)
   is resized in HTML or CSS from 640×480 to 606×456. Serving a scaled image could
   save 4.9KiB (11% reduction).
 * As it turns out in my posts Shashin codes like `[shashin type="photo" id="31"
   size="large"]` generated HTML like `<img src="https://lh5.googleusercontent.com/-
   MvaubvtLHmM/UAySJWkLYbI/AAAAAAAAAEo/I2E_2LzTV44/IMG_0879.JPG?imgmax=640" alt="
   Wifi switchover fail" width="600" height="450" class="shashinThumbnailImage" 
   id="shashinThumbnailImage_1" />`
 * I could easily notice that these images could be resized on the server side by
   providing the relevant imgmax parameter like [https://lh5.googleusercontent.com/-MvaubvtLHmM/UAySJWkLYbI/AAAAAAAAAEo/I2E_2LzTV44/IMG_0879.JPG?imgmax=600](https://lh5.googleusercontent.com/-MvaubvtLHmM/UAySJWkLYbI/AAAAAAAAAEo/I2E_2LzTV44/IMG_0879.JPG?imgmax=600)
 * This would conserve bandwith as much as possible.
 * Is there any reason why Shashin doesn’t use the best value for this parameter
   in such cases?
 * Thanks,
    Laci
 * [http://wordpress.org/extend/plugins/shashin/](http://wordpress.org/extend/plugins/shashin/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Mike Toppa](https://wordpress.org/support/users/toppa/)
 * (@toppa)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/suboptimal-image-resizing-problem/#post-3310568)
 * Thanks for pointing this out. When I wrote the code for handling sizing, Picasa
   only allowed you to request photos from a limited set of sizes. For example, 
   600 was not a valid option – you had to choose either 576 or 640. Now it looks
   like you can get any size you want from Picasa. When I added support for Twitpic
   and Youtube, I wanted to provide a consistent user experience with the sizes (
   as Twitpic also had a limited set of sizes, which were different from Picasa’s).
   So Shashin picks the next largest valid size from whatever size you specify, 
   and then relies on browser scaling.
 * I’ve added this to the issues list: [https://github.com/toppa/Shashin/issues/37](https://github.com/toppa/Shashin/issues/37)

Viewing 1 replies (of 1 total)

The topic ‘Suboptimal image resizing problem’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/shashin.svg)
 * [Shashin](https://wordpress.org/plugins/shashin/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shashin/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shashin/)
 * [Active Topics](https://wordpress.org/support/plugin/shashin/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shashin/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shashin/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Mike Toppa](https://wordpress.org/support/users/toppa/)
 * Last activity: [13 years, 5 months ago](https://wordpress.org/support/topic/suboptimal-image-resizing-problem/#post-3310568)
 * Status: not resolved