Title: Incompatible &#8211; &#8220;wrong&#8221; &#8211; image size generated
Last modified: July 22, 2018

---

# Incompatible – “wrong” – image size generated

 *  [bst7](https://wordpress.org/support/users/bst7/)
 * (@bst7)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/wrong-image-size-generated/)
 * The image sizes that RT generates sometimes does not match the original image
   sizes generated by WP’s media library when image was uploaded
 * In the linked post, it has an image tag referencing this image:
    [http://www.williamstewart.me/wordpress/wp-content/uploads/2013/10/20131013-L2009596.jpg](http://www.williamstewart.me/wordpress/wp-content/uploads/2013/10/20131013-L2009596.jpg)
 * The IMG src and srcset images are looking for this image:
    [http://www.williamstewart.me/wordpress/wp-content/uploads/2013/10/20131013-L2009596-620×442.jpg](http://www.williamstewart.me/wordpress/wp-content/uploads/2013/10/20131013-L2009596-620×442.jpg)
 * The 620 size was added by:
    add_image_size( ‘ws-large-620’, 620, 9999 );
 * The size of the image generated by RT when I regenerated it with that image size
   set is:
    [http://www.williamstewart.me/wordpress/wp-content/uploads/2013/10/20131013-L2009596-620×443.jpg](http://www.williamstewart.me/wordpress/wp-content/uploads/2013/10/20131013-L2009596-620×443.jpg)
 * I’ve seen this with quite a few images on my site, and have gone through and 
   manually fixed them, but this is a problem for me – I have alot of images that
   still need to be fixed.
 * Looking at the source image, it has dimensions of: 896×640. Scaling this down
   to a 620 width, gives:
    442.857142857142857
 * So, it looks like the RT plugin is rounding up (which Photoshop does as well):
   
   int(442.857142857142857 + 0.5) gives 443
 * Whereas the original WP upload generates a size by truncating:
    int(442.857142857142857)
   gives 442
 * Because I can’t regenerate the HTML code (the srcset also has the “wrong” image
   size), so the image sizes that the plugin does generate has to be completely 
   compatible with the pre-existing HTML parameters, which is a substantial problem..
 * I’m guessing this is a known issue, and I agree that it is a better behaviour.
   But because I can’t regenerate the HTML now, it is a huge problem for me (I can’t“
   fix” the srcset sizes without being able to do that).
 * Ideally, I would like to be able to regenerate the HTML along with the regeneration
   of the images.
 * Thanks
 * William
    -  This topic was modified 7 years, 10 months ago by [bst7](https://wordpress.org/support/users/bst7/).
    -  This topic was modified 7 years, 10 months ago by [bst7](https://wordpress.org/support/users/bst7/).
    -  This topic was modified 7 years, 10 months ago by [bst7](https://wordpress.org/support/users/bst7/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwrong-image-size-generated%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

The topic ‘Incompatible – “wrong” – image size generated’ is closed to new replies.

 * ![](https://ps.w.org/regenerate-thumbnails/assets/icon-128x128.png?rev=1753390)
 * [Regenerate Thumbnails](https://wordpress.org/plugins/regenerate-thumbnails/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/regenerate-thumbnails/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/regenerate-thumbnails/)
 * [Active Topics](https://wordpress.org/support/plugin/regenerate-thumbnails/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/regenerate-thumbnails/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/regenerate-thumbnails/reviews/)

## Tags

 * [srcset](https://wordpress.org/support/topic-tag/srcset/)

 * 0 replies
 * 1 participant
 * Last reply from: [bst7](https://wordpress.org/support/users/bst7/)
 * Last activity: [7 years, 10 months ago](https://wordpress.org/support/topic/wrong-image-size-generated/)
 * Status: not resolved