• itsalltech1

    (@itsalltech1)


    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!

    http://www.itsalltech.com

Viewing 3 replies - 1 through 3 (of 3 total)
  • PBP_Editor

    (@pbp_editor)

    Post your index.php code from your theme. What resize script are you using? Is this using tim_thumb.php?

    Thread Starter itsalltech1

    (@itsalltech1)

    Here is my index.php code:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Thread Starter itsalltech1

    (@itsalltech1)

    The resize script resides in core.php (<?php images(‘1’, ‘250’, ‘180’, ‘alignleft’, false); ?>)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Need help writing a conditional image resize’ is closed to new replies.