• anonymized-14293447

    (@anonymized-14293447)


    I’m sorry I have to open a thread for such an issue, but I don’t find any satisfactory solution on the web.
    1) I have deleted all extra images generated by WordPress. I have set media to zero, but any upload keeps generating extra images. It’s not my theme, and there’s no set_post_thumbnail_size in my function.php.
    2) Another problem is that I don’t want those extra images but at least the thumbnails for the Admin panel. Is there a function just to show a resized version of the original images in the library column?
    Please don’t give me the usual regenerate-plugin, as I don’t need to regenerate any images.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    By default, WP generates 4 sizes for each image — large, medium-large, medium, and thumbnail. You can add more with add_image_size. You can also remove any of the defaults, though the side-effects of that may become an issue for plugins and such that might expect them to be there. See https://codex.www.ads-software.com/Function_Reference/remove_image_size

    Thread Starter anonymized-14293447

    (@anonymized-14293447)

    I’m fine with plugins and my theme only uses original size images.
    If you have it, can you please give me a solution to why the media settings aren’t taking place?
    And how to create thumbnails only for the library list?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    If you change media settings, they apply only going forward. Existing images are not affected. If you want to have ONLY thumbnail sizes, then use the remove_image_size function to remove the sizes you don’t want. You’ll need to use FTP or the command line to delete the associated image files as removing a size does not remove existing files.

    One more thing to consider — WordPress uses those other images to generate srcset listings so browsers don’t waste bandwidth downloading huge image files if it’s a narrow/small window and a smaller image is available. See https://make.www.ads-software.com/core/2015/11/10/responsive-images-in-wordpress-4-4/ for more information about that.

    By getting rid of alternate image sizes, you will probably pay a penalty in search rankings as well as visible site speed.

    Thread Starter anonymized-14293447

    (@anonymized-14293447)

    No, actually the zero settings aren’t applied to newly uploaded images… that’s the problem I’m talking about.
    The remove_image_size function wouldn’t be useless since I have already removed them?

    I understand that extra images can be useful for caching or seo, but it’s not going to be the case for my theme. Especially since the images generated produced some random scaling and not resizing.

    Also, my theme has got none of all the new srcset functions, so it wouldn’t help unless it’s all rewritten (which no one is going to do).

    I cannot have extra images whereas my current directory is of 6k and will just keep growing, so I need to have only original sizes (which by the way are in the reign of max 300×300). Why is anyone suggesting to delete them if you don’t need them otherwise?

    • This reply was modified 8 years, 5 months ago by anonymized-14293447.
    • This reply was modified 8 years, 5 months ago by anonymized-14293447.
    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    No, actually the zero settings aren’t applied to newly uploaded images… that’s the problem I’m talking about.

    I’m not sure what you’re talking about. You don’t seem to be actually replying to any of my points.

    SRCSET is added by WP core, not by your theme, unless it disables that functionality.

    Why is anyone suggesting to delete them if you don’t need them otherwise?

    what?

    1. use remove_image_size in your theme to remove image sizes you don’t want created.

    2. delete the files that were created prior to adding the remove_images_size code.

    I’m not sure how to be much clearer than that.

    Thread Starter anonymized-14293447

    (@anonymized-14293447)

    English and PHP are not exactly my languages ?? Let me try to catch up with you.
    1) After setting media to zero, newly uploaded images still creates new ones. They shouldn’t because I have set it to “do not generate images”
    2) believe it or not, but scrset is not to be found anywhere in my Wp-core
    3) I do understand the action of remove_image_size for future/past uploads, I’m just wondering that it would not work because of point (1)
    Right now I would like to investigate to why (1) is not working, because this would mean that something is missing in the core (like (2), for example)
    And I need to understand the truth behind the utility of these extra images: you say that they are needed but in every forum/tutorial I read that’s better to delete them if you need disk-space.

    • This reply was modified 8 years, 5 months ago by anonymized-14293447.
    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    After setting media to zero,

    what does that mean?

    n every forum/tutorial I read that’s better to delete them if you need disk-space.

    I just explained why you might want them. I can’t answer to “every tutorial you’ve read”. If disk space is that much of an issue, you might want to look into better hosting.

    Thread Starter anonymized-14293447

    (@anonymized-14293447)

    media settings… you know, settings the size of thumbnails/small/medium/large images. Isn’t that the one controlling the extra images created by WP?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    putting zeros in there does nothing useful.

    Thread Starter anonymized-14293447

    (@anonymized-14293447)

    I tried the function you are suggesting, to no avail:

    add_action('init', 'remove_then_add_image_sizes');
    function remove_then_add_image_sizes() {
    	remove_image_size('image-name');
    	add_image_size('image-name', 200, 200, true);
    }

    I just keeps adding extra images, plus the 200×200 I specified above.
    No other possibilities to have only one image size in my library (original), plus one thumbnail?

    • This reply was modified 8 years, 5 months ago by anonymized-14293447.
    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    what is ‘image_name’ supposed to be? That’s a sample string, not what you’re supposed to add.

    Thread Starter anonymized-14293447

    (@anonymized-14293447)

    I thought it was a codex string to call all images. ?? But then is this only for one image?
    However, notwithstanding the still popular claim that setting media to zero will work, I’m testing this other function and these 2 plugins:
    https://www.ads-software.com/plugins/wp-performance-pack/
    https://www.ads-software.com/plugins/image-sizes/
    https://www.ads-software.com/plugins/ewww-image-optimizer/

    • This reply was modified 8 years, 5 months ago by anonymized-14293447.
Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘media settings not working, and thumbnails’ is closed to new replies.