• Hi all,

    I created some custom image sizes a while back (I can’t remember how), and now they always upload whenever I upload a new image to the wordpress media library.

    I’m running multisite and have multiple themes installed. All themes have this problem, and although I am able to remove those unwanted, previously-defined sizes by using the remove_image_size function in a theme’s functions.php (as described here: https://codex.wordpress.org/Function_Reference/remove_image_size), it only works when that code is left in the functions.php of the theme. Newly uploaded images have all the unwanted sizes show again after I remove the code.

    Does anybody know what is causing this error and how I can fix it? Thank you very much for your help.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • That is not an error. It is how WordPress works. If you do not want the extra images, do not remove the code. Check with your theme developer for more info as this is not a problem with WordPress.

    Thread Starter charliep127

    (@charliep127)

    These are not the thumbnail/medium/large sizes, these are extra images that I defined. The names of then are 350auto and 350245. It produces these images for every theme (I run multiple themes on the network), and it even produces them when I download a new theme and upload pictures to it. In other words, the issue isn’t theme-specific.

    This is what I’ve been posting in my functions.php of each theme.

    add_action(‘init’, ‘remove_350auto_images’);
    function remove_350auto_images() {
    remove_image_size(‘350auto’);
    }
    add_action(‘init’, ‘remove_350245_images’);
    function remove_350245_images() {
    remove_image_size(‘350245’);
    }

    Should I also post it elsewhere, to make sure these images aren’t generated in the first place?

    I am a bit confused – you said that these are extra images that you defined, where did you define them in the first place?

    Thread Starter charliep127

    (@charliep127)

    Yes, I cannot get rid of the 350auto and 350245 image sizes that I defined. Unfortunately, I can’t remember where I defined them – it may have been through a plugin.

    Thread Starter charliep127

    (@charliep127)

    Any ideas?

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

The topic ‘Preventing Previously Defined Image Sizes from Uploading’ is closed to new replies.