consistent thumbnail width?
-
I’m attempting to set my default thumbnail size in such a way that my width will always be consistent – ideally 550px. An example can be found here: http://www.look-closer.net
I have managed to set my long edge to whatever my heart desires, but am having trouble making a static base, and dynamic height while preserving whatever ratio my original file happens to have.
I found this on another board:
if ( $metadata[‘width’] >= $metadata[‘height’] ) {
$max_side = apply_filters( ‘wp_thumbnail_max_side_length’, 150, $attachment_id, $file );
} else {
$max_side = apply_filters( ‘wp_thumbnail_max_side_length’, 200, $attachment_id, $file );
}to replace line 153 in my image.php file, the line that determines long edge length. Unfortunately, this only works for images of a specific ratio, as far as I have been able to tell.
I am using Barthelme 1.1 for a theme, more or less, which came with my WP install. You can view my page in its infancy at alfresco.geminetix.com. I’ve just started playing with wordpress, so all the images are random pictures I’ve taken, with pretty random comments, just to get an idea of layout.
I appreciate any help- and hurrah for a first time post!
The topic ‘consistent thumbnail width?’ is closed to new replies.