sirulli / yoimages

Better image handling capabilities for Wordpress
http://sirulli.org/yoimages/
GNU General Public License v2.0
16 stars 10 forks source link

Not all image sizes are shown #55

Open noesteijver opened 6 years ago

noesteijver commented 6 years ago

Hello,

I've been using this plugin for a while now and it's working really nice.

This week we stumbled upon an issue: not all image size are loaded in the plugin.

I've been digging into this: I tried to fetch all the image sizes with the function 'yoimg_get_image_sizes'. And I can see that this function does retrieve all the image sizes. This function is also used for the settings page and for the cropping tool. But somehow not all image sizes are being display.

Maybe there's a restriction to the number of images sizes? Or is this a bug?

Hope to hear from you, thanks in advance! -Kevin

warudin commented 6 years ago

I've had this problem as well, not all image sizes were shown. This was my code:

function extra_image_sizes() {
    add_image_size( 'case-thumb', 690, 390, true );
    add_image_size( 'team-thumb', 450, 575, true );
    add_image_size( 'case-archive-thumb', 740, 490, true );
    add_image_size( 'hero', 1440, 810, array('center', 'center') );
}
add_action( 'after_setup_theme', 'extra_image_sizes' );

The 'hero' image wasn't showing up. After removing array('center', 'center') the image format does show up. So every format with a custom crop gets filtered. So it seems like this was an actual choice when developing yoimages, but I'm not sure if the right decision was made.