Need help writing a conditional image resize
-
I am trying to setup my site so that it grabs the first image of the post and displays it to the left of the post excerpt. However, this works only for some images. If the image is smaller than the size (270×159), then it appears stretched. I am wondering if it would be possible to write a condition where if the image is smaller, then change the default size (270×159) to the smaller image’s size. However, if the image is the same or smaller than the default size, don’t touch it. Is this possible? If yes, can someone please help me out with the code? Thanks!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Need help writing a conditional image resize’ is closed to new replies.