WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Want to maintain aspect ratio of image thumbnail (5 posts)

  1. needforname
    Member
    Posted 5 years ago #

    I'm a newbie. I r dumb. Now that's out of the way, here's my stupid question:

    I'm wanting to be able to view an image in both large size as well as thumbnail. The thumbnail is for the post, and the large size is when the image is clicked.

    I like the way the Lightbox 2 plugin shows the large view of an image, but my problem is that the thumbnail version of my pictures are cropped into a square. I WANT to maintain the aspect ratio of the original image. Is there a way I can do this?

    Thanks for any help.

  2. tomontoast
    Member
    Posted 5 years ago #

    Thumbnails are hardcoded in the wordpress code to be square. If you want them to keep the same aspect ratio as the original you must either modify the wordpress code or write your own plugin. There may be plugins out there that do this. Try searching the plugins database.

  3. kmessinger
    Volunteer Moderator
    Posted 5 years ago #

    Go to settings, media. You can set the size you want for thumbnails and medium size, etc.

    If you leave the thumbnail setting at 0 and 0, they should be proportional based upon your original image.

  4. tomontoast
    Member
    Posted 5 years ago #

    Oops I was wrong about it being hardcoded, you can make thumbnails proportional by going to media settings and unticking the box where it says

    Crop thumbnail to exact dimensions (normally thumbnails are proportional)

  5. needforname
    Member
    Posted 5 years ago #

    Thanks for the replies. Tomontoast, that seemed to do the trick. The aspect ratio seems to round off to the nearest amount, but it's close enough. Thanks a bunch :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.