WordPress.org

Forums

Automatically Enlarge Images? (5 posts)

  1. Javier Schvindlerman
    Member
    Posted 3 years ago #

    Hi everybody!

    A small question here today: Does anybody know a way to automatically resize images when uploading so they are bigger?

    I'm using the add thumbnail size because I need the theme to be able to be sure that some images are larger than screen width (I'm looking for 1600px width) so they fit the browser no matter what.

    I just realized that it is not working and -correct me if I'm wrong- I guess it only works to make the images smaller, not larger. Am I right?

    Is there a way to make that happen? Any other way?

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    Does anybody know a way to automatically resize images when uploading so they are bigger?

    Even if that was possible (which it isn't), the resulting image would look pretty dreadful. Try it in any graphics application and you'll see what I mean.

  3. Javier Schvindlerman
    Member
    Posted 3 years ago #

    Yeah, off course... I'm starting off the premise that the uploaded images should be pretty big, and just providing a way to make the not soo big images to be used anyway. Enlarging a 1200x800 px to make the width 1600 is not so terrible. I know is not best, but not so terrible anyway ;).

  4. Anders
    Member
    Posted 3 years ago #

    It's possible by adding some hooks and filters, but you might as well just resize the images using CSS. Think about it - there is no point forcing WP to enlarge the image and store a larger file when it's going to be degrated anyway.

    So, just use CSS to render the image in larger format than it is.

  5. Javier Schvindlerman
    Member
    Posted 3 years ago #

    Hey Anders!

    Well, yes. That was my first thought, but I need the images to entirely fit the width of the browser. So I concluded I should make them just bigger and show their width according to the browser's width.

    Do you think there is a way through CSS to render them as 100% width and still declare their previous size?

    P.S. Thanks for the help!

Topic Closed

This topic has been closed to new replies.

About this Topic