Title: Conversion fail &#8211; size rounding error? | Bug on 2.6
Last modified: August 22, 2016

---

# Conversion fail – size rounding error? | Bug on 2.6

 *  Resolved [scheeko](https://wordpress.org/support/users/scheeko/)
 * (@scheeko)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/size-rounding-error/)
 * I’m having an issue with retina file generation in 2.6. If I attach an image 
   2000×1333 if fails for my largest size (1000pixel wide, therefore half the size,
   so height would be 666.5>667):
 *     ```
       2015-02-03 10:56:52: ** RETINA INFO FOR ATTACHMENT '2015/02/Laguna-de-los-tres.jpg' **
       2015-02-03 10:56:52: - Original: Laguna-de-los-tres.jpg
       2015-02-03 10:56:53: - thumbnail: /wp-content/uploads/2015/02/Laguna-de-los-tres-200x200.jpg -> /wp-content/uploads/2015/02/Laguna-de-los-tres-200x200@2x.jpg => RESIZE
       2015-02-03 10:56:53: - medium: /wp-content/uploads/2015/02/Laguna-de-los-tres-500x333.jpg -> /wp-content/uploads/2015/02/Laguna-de-los-tres-500x333@2x.jpg => RESIZE
       2015-02-03 10:56:53: - large: /wp-content/uploads/2015/02/Laguna-de-los-tres-1000x667.jpg -> /wp-content/uploads/2015/02/Laguna-de-los-tres-1000x667@2x.jpg => FAIL
       ```
   
 * The 1000×667 is generated ok, but it fails on 1000×667@2x. This did not happen
   before v2.6, as I have used this aspect ratio frequently before.
 * If I crop the original image to 2000×1330, then it generates both a 1000×665 
   and 1000×665@2x perfectly. So maybe it’s related to the rounding of the 0.5 pixel?
 * Thanks
 * [https://wordpress.org/plugins/wp-retina-2x/](https://wordpress.org/plugins/wp-retina-2x/)

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/size-rounding-error/#post-5745836)
 * Actually I believed I experienced this issue with previous versions as well… 
   I didn’t change it in the new version. Give me a few days, I am going to replicate
   exactly your image sizes and photo sizes. I must fix this 🙂
 *  Thread Starter [scheeko](https://wordpress.org/support/users/scheeko/)
 * (@scheeko)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/size-rounding-error/#post-5745837)
 * Hello Jordy,
    Thanks for the response and there’s no rush!
 * Just to give a little more info, since I’m sure there’s _something_ going on 
   now, that didn’t happen before. Another [image](http://blog.scheeko.org/wp-content/uploads/2013/09/The-Cape-212.jpg)
   with the same dimensions (2000×1333):
 * I went to the plugin and regenerated the retina files and it generated a 1000
   ×666 file (the @2x, again failed). But when I check what’s on the server from
   an older usage, the files there were 1000×667 and 1000×667@2x.
 * There’s clearly something happening with that rounding too (although I don’t 
   understand why the conversion fails). I also wonder if it’s related to some other
   software or code that’s doing the actual resizing (sorry, I didn’t actually go
   and investigate what your plugin is doing).
 * Thanks,
    F
 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/size-rounding-error/#post-5745902)
 * Definitely a rounding issue. The calculation of the retina image is based on 
   the new images created by WordPress, which are themselves based on the images
   uploaded by the users. There was often a difference between what the plugin expects
   and how the images are resizes by WordPress so now the plugin allows a little
   error margin (2px max).
 * I did some testing myself and it seems to work perfectly. Please give me one 
   or two days and the next release should work much better for you 🙂
 *  Thread Starter [scheeko](https://wordpress.org/support/users/scheeko/)
 * (@scheeko)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/size-rounding-error/#post-5745904)
 * Thanks! It is a great plugin, so I’m glad I could help.
 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/size-rounding-error/#post-5745909)
 * Did you get a chance to try the new version of the plugin? 🙂
 *  Thread Starter [scheeko](https://wordpress.org/support/users/scheeko/)
 * (@scheeko)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/size-rounding-error/#post-5745910)
 * Hello,
    it’s working perfectly! Thanks.
 * PS: The new interface looks great.
 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/size-rounding-error/#post-5745911)
 * Super thanks! I am glad everything works 🙂 Have a nice Sunday!
 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/size-rounding-error/#post-5745912)
 * By the way, f you have time to write a small review… please don’t hesitate 😉
   Don’t worry, don’t feel like you have to do it.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Conversion fail – size rounding error? | Bug on 2.6’ is closed to new
replies.

 * ![](https://ps.w.org/wp-retina-2x/assets/icon-256x256.png?rev=2597316)
 * [Perfect Images: Regenerate Thumbnails, Image Sizes, WebP & AVIF](https://wordpress.org/plugins/wp-retina-2x/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-retina-2x/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-retina-2x/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-retina-2x/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-retina-2x/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-retina-2x/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/size-rounding-error/#post-5745912)
 * Status: resolved