Plugin compatibility with 9999 height setting
-
Hi there,
A common technique for creating custom WP thumbs where you want a fixed width but with a variable height which respects to original aspect ratio is to do somehthing like this:
add_image_size( 'category-thumb', 300, 9999 ); //300 pixels wide (and unlimited height)
You can see this documented here
https://codex.www.ads-software.com/Post_Thumbnails
and here
https://developer.www.ads-software.com/reference/functions/add_image_size/(search for 9999 )
This is a very useful technique but when you use your plugin, the technique fails as it ends up generating an image that is 9999 pixels high rather than the variable height based on the original image aspect ratio.
Can you implement a fix to ignore the 9999 height specifically?
You’ll see most of the core WordPress themes also use the 9999 techniqueColm
- The topic ‘Plugin compatibility with 9999 height setting’ is closed to new replies.