WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Thumbnails not being generated at correct size (13 posts)

  1. AlecRust
    Member
    Posted 2 years ago #

    I have my WordPress Media settings set like so. Based on these settings no generated thumbnail should exceed the width of 540px.

    I embed an image in a post like so. I choose "Large" as a thumbnail size, which should have a restricted width of 540px.

    The end result is a thumbnail of 1024x769px. Why won't these thumbnails adhere to my Media settings?

  2. shaquilleray
    Member
    Posted 2 years ago #

    Its probably because you didn't set a specific height as it appears to be set as 0. Try adjusting the height and try again!

  3. AlecRust
    Member
    Posted 2 years ago #

    But I don't want to set the height, I just want to make sure generated thumbnails don't exceed the width of 540px. So for example in this instance the image (if proportions are retained) would have a width of 540px and a height of 405px (as it shows in my screenshot).

    Setting the height value to "0" means a particular height won't be forced, correct?

  4. esmi
    Forum Moderator
    Posted 2 years ago #

    No. Set a height value.

  5. AlecRust
    Member
    Posted 2 years ago #

    OK, so if I set a height value (say 540px) what does that mean exactly:

    1. The image just won't exceed that height and the resulting thumbnail will be the correct 540x405px

    or

    2. The image gets distorted and resized to 540x540px

  6. shaquilleray
    Member
    Posted 2 years ago #

    1 and 2 if the image is set to 540 by 540px. Try 540 by 420px

    That should avoid distortion. If you want to aviod distortion entirely you may want to Crop the image to whatever size you wish using something like Photoshop or Gimp for instance.

  7. esmi
    Forum Moderator
    Posted 2 years ago #

    The image just won't exceed that height

    Yes. The image should still be resized proportionally (assuming this is not the thumbnail AND "Crop thumbnail to exact dimensions" isn't checked). So, the largest length will be set to 540px and the other dimension changed proportionally. If you want to try and set a width only, try setting the height to a large number (eg 1024).

  8. AlecRust
    Member
    Posted 2 years ago #

    Thank you esmi, that's answered my question.

    1 and 2 if the image is set to 540 by 540px. Try 540 by 420px

    I'd rather not, since I want to allow images to be uploaded at any dimensions and just the width be forced to 540px. As esmi has said though as long as it resizes proportionally I can set the height to a large number (e.g. 1024).

  9. AlecRust
    Member
    Posted 2 years ago #

    I understand from other answers that these different thumbnail sizes are in fact only generated on image upload (rather than image embed) can anyone confirm this?

  10. esmi
    Forum Moderator
    Posted 2 years ago #

    They are generated on image upload, yes.

  11. AlecRust
    Member
    Posted 2 years ago #

    OK, so if I changed these Media Settings after the images were first uploaded, my thumbnails won't be generated at the new correct dimensions?

    Based on that should I use something like Regenerate Thumbnails to recreate all of these thumbnails at the correct dimensions?

  12. esmi
    Forum Moderator
    Posted 2 years ago #

    my thumbnails won't be generated at the new correct dimensions?

    Correct. That's what the Regenerate Thumbnails plugin fixes.

  13. AlecRust
    Member
    Posted 2 years ago #

    Many thanks! Resolved.

Topic Closed

This topic has been closed to new replies.

About this Topic