Tag Info

New answers tagged


Instead of your code for image, use this following. <?php $thumb_image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 120, 90, true ); ?> <img src="<?php echo $thumb_image[0]; ?>" alt="<?php echo esc_html( get_the_title() ); ?>" width="<?php echo $thumb_image[1]; ?>" height="<?php echo $thumb_image[2]; ...


Here is my working solution. The code is documented, so it should be clear what each function does. I pretty much use the wp_generate_attachment_metadata filter to create the needed images after the image has been uploaded. The generated images are listed in the metadata too, like any other intermediate image size. That way you can pretty much work with ...

Top 50 recent answers are included