WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Media Library - why are there 4 versions of every image? (11 posts)

  1. V_Shaft
    Member
    Posted 2 years ago #

    Whenever I upload a picture, I get 4 versions of each placed in my Media Library. For example:

    Uploaded file: picture.jpg

    The WP Media Gallery accessed through the Dashboard shows images normally, as they should be, one instance of each.

    But when I access my server via FTP, I find that in the folder there there are 3 additional files of picture.jpg, making a total of 4. Like thus:

    picture.jpg [original size]
    picture-400x300.jpg [my large size]
    picture-266x200.jpg [my medium size]
    picture-200x200.jpg [my thumnbail size]

    I mean, what the hell is up with that? I don't want my original image quantity to be quadrupled! Is there an option I need to disable in order to do remedy that, or do I have to manually delete the extra files every times via FTP?

  2. kmessinger
    Volunteer Moderator
    Posted 2 years ago #

    You can leave the settings blank, http://codex.wordpress.org/Inserting_Images_into_Posts_and_Pages and then whatever size you don't want will be grayed out. If you only use one size that is the way to go.

    [Edit] The above is incorrect. Sorry.

  3. kmessinger
    Volunteer Moderator
    Posted 2 years ago #

    The theme will tell wp how many image files to create. You can make a child theme and change that. For example in twentyeleven that function is found in functions.php.

    I have looked for a plugin with no success. Alternatively you can set a very small size in the media settings, like 5x5 and although you still have several files they are very small in case this is a storage issue.

  4. V_Shaft
    Member
    Posted 2 years ago #

    Actually, your first answer was correct in a way: you don't leave the fields blank, but you can set them all to 0 in Dashboard --> Seetings --> Media. This will only upload the image in the original size, where you have to click on it again and resize it to, let's say, 60%, or you can manually insert the width="X" height="Y" attributes inside the HTML code.

    But, let's put all that aside for a moment. My question is this: doesn't anybody find this multiple uploading... downright stupid?

    I mean, I'm no programmer at all, but even I see how dumb this is. I upload a picture in original size, let's say it's 640x480. But I want to display in 400x220 in my post so I'll add the width="420" height="220" attributes.

    The code would look like this:

    <img class="aligncenter size-medium wp-image-6529" title="man woman wall 05" src="http://coolawesomemovies.com/wp-content/uploads/2011/09/man-woman-wall-05.jpg" alt="" width="400" height="220" />

    This would mean "show the 640x320 original sized image in 400x220".

    But what WP does is create a copy of my picture in all sizes, and then inserts the following code into my post:

    <img class="aligncenter size-medium wp-image-6529" title="man woman wall 05" src="http://coolawesomemovies.com/wp-content/uploads/2011/09/man-woman-wall-05-400x220.jpg" alt="" width="400" height="220" />

    Instead of saying "show the 640x320 original sized image in 400x220", this basically says "show the image already resized to 400x220, which is stored as a standalone copy of the original image on your server, in 400x220".

    I mean... WHAT?! This has to be one of the dumbest things I've ever seen, and not to say what it'll do towards cluttering your server. The person who came up with this in the first place should be shot.

  5. esmi
    Forum Moderator
    Posted 2 years ago #

    doesn't anybody find this multiple uploading... downright stupid?

    Most users do not have a problem with it.

    I'll add the width="420" height="220" attributes

    That's really bad practice. You should not resize images via markup.

  6. V_Shaft
    Member
    Posted 2 years ago #

    Most users do not have a problem with it.

    Well, then, I guess most users have unlimited web space. I for one, do not. I have a site with film reviews where I post several screenshots per post, and I don't want additional 3 (!) redundant images for every image I upload.

    That's really bad practice. You should not resize images via markup.

    Care to elaborate?

  7. esmi
    Forum Moderator
    Posted 2 years ago #

    I don't want additional 3 (!) redundant images for every image I upload.

    Then switch themes. Or modify your existing theme. By default, WP only creates 3 extra images if the uploaded image is large than the dimensions that you configured in Settings -> Media.

    Care to elaborate?

    If you upload a 1000 x 1000px image and in the mark-up, reduce this to 20 x 20px, the full size image is still loaded by the browser before it is resized. This leads to poor page download/rendering times and, almost always, really appalling final images.

  8. V_Shaft
    Member
    Posted 2 years ago #

    Between having 3000 utterly useless image files for every 1000 I upload and resizing via markup, I'll stick with the markup. It worked for me for 4 years on Blogger, it's gonna work now, too.

  9. esmi
    Forum Moderator
    Posted 2 years ago #

    Why not increase the dimensions of all image sizes in Settings -> Media to sizes that will be much larger than your largest image upload?

  10. V_Shaft
    Member
    Posted 2 years ago #

    OK, but how would that change anything? Let's say I put all dimensions to 1000x1000, and the max sized image I plan to upload is 640x480. So I upload such an image and it would initially show as 640x480 in my post, right? But I want it to display in 50% that size. To do that I'd still have to use markups, or - before uploading - resize the image in an image editing program.

    I already set my sizes, not to much larger than my largest upload, but to 0: which uploads only the image in original size, which I then proceed to scale with the markup. I do not have a HD film gallery sites, my usual uploads sizes are around 500-700px width 200-400px height and to not affect loading times very much. So markups will do just fine.

  11. nadine00
    Member
    Posted 2 years ago #

    I think what's annoying is that wordpress will make extra images, but not add them to the media library. So you have all these images, which is handy that it does that, but then they just sit in the folder, un-added and un-manageable, and most of the time un-noticed.

    Is there a plugin or a better way to better manage wordpress images? I'm already using add from server, but I find media handling is WPs weak area.

Topic Closed

This topic has been closed to new replies.

About this Topic