• I’ve been trying to modify the image resize code to create thumbnails from the original image by just shrinking the original by a percentage. I can easily do this with CSS class on a custom field; however I’m using the Timthumb automatic thumbnail generator. I can’t figure out how to either disable it or change the following code to reflect a percentage

    $values = get_post_custom_values(“fpthumb”); echo $values[0]; ?>&w=300&h=275&zc=1&q=100″

    Anyone know how to do this? Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter kayelless

    (@kayelless)

    After trial and error research I discovered to change the above code to ?>&w=”&h=”&zc=0&q=100″
    The w & h parameters are left blank to prevent pixel size restraints
    zc = zoom or crop so set this to “0” which means to “zoom” the full image for resizing without cropping.

    Then I further added a CSS image class which provided the size parameters in percentages as below:

    $values = get_post_custom_values(“fpthumb”); echo $values[0]; ?>&w=”&h=”&zc=0&q=100″
    alt=”<?php the_title(); ?>” class=”thumbnail”
    CSS
    thumbnail {
    float: left;
    height: auto;
    width: 25%;
    margin-top: auto;
    margin-right: 2%;
    margin-bottom: auto;
    margin-left: auto;
    }

    i been after something like this for some time, can you explain in abit more detail please mate?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Resize image via percentage of original size’ is closed to new replies.