Support » Plugin: Optimize Images Resizing » Prevention of extra images blocked by image_size_names_choose?

  • Resolved pokes

    (@pokes)


    I see in the changelog you have

    Avoid removing image sizes that are added via ‘image_size_names_choose’ filter (they get generated anyway on the Media screen).

    Does this mean that this plugin will not remove any additional images added to image_size_names_choose?

    If so, is there a way I can prevent the theme from adding the extra image sizes to image_size_names_choose so that the plugin can then prevent their creation?

    https://wordpress.org/plugins/optimize-images-resizing/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author OriginalEXE

    (@originalexe)

    Yes, that’s what that means. The reason why those image sizes are not deleted is because they get regenerated on the media screen anyway, and since you probably use media interface, they would be cleaned up for nothing.

    Adding the image size in the theme won’t automatically add it to that filter. If your theme does indeed add image sizes to that filter, you can just use the remove_filter function, or apply_filter yourself after he theme and remove the image names from the array.

    Yes my theme adds image sizes to image_size_names_choose. I’ve prevented this temporarily and uploaded a new image. Only the default image sizes were generated immediately.

    Can you clarify for me the ‘media screen’ you refer to that causes the remaining registered (theme) sizes to be generated as they haven’t been yet?

    Plugin Author OriginalEXE

    (@originalexe)

    What I mean by that is the dialog you get when you visit Media in the admin, or when uploading featured image for example.

    I’m not seeing that behaviour.


    Plugin is working – I can see previously missing additional images being generated on request.
    I’ve removed theme-added sizes from image_size_names_choose.
    I upload a new image via Media Library.
    Default image sizes only are generated.
    I visit the Media Library in admin then I check and still only default image sizes are there.

    This is my desired outcome, but you seem to be saying it shouldn’t work and the registered theme image sizes should have been generated when I visited Media?

    Ignore that, I’ve realised my error.

    Thanks for a great plugin!

    Plugin Author OriginalEXE

    (@originalexe)

    No problem, glad it’s useful to you 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Prevention of extra images blocked by image_size_names_choose?’ is closed to new replies.