Wordpress-使用TimThumb调整图像大小
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Wordpress-使用TimThumb调整图像大小相关的知识,希望对你有一定的参考价值。
TimThumb should be in the template folder named as "thumb.php".Change H (height in px), W (width in px), Q (quality 0-100), ZC (zoom cropping 0-1) values.
You can provide only one of the dimensions of the picture to get a proportional scale.
// Image loaded from a Custom Field <img src="<?php echo bloginfo('template_url'); ?>/thumb.php?src=<?php echo get_post_meta($post->ID, "image", $single = true); ?>&h=75&w=75&zc=1&q=90" alt="<?php the_title(); ?>" /> // Image loaded from images folder in template <img src="<?php echo bloginfo('template_url'); ?>/thumb.php?src=<?php echo bloginfo('template_url'); ?>/images/picname.jpg&h=75&w=75&zc=1&q=90" alt="<?php the_title(); ?>" /> // Image URI hard-coded <img src="<?php echo bloginfo('template_url'); ?>/thumb.php?src=http://www.xaviesteve.com/image.jpg&h=75&w=75&zc=1&q=90" alt="<?php the_title(); ?>" />
以上是关于Wordpress-使用TimThumb调整图像大小的主要内容,如果未能解决你的问题,请参考以下文章