Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • I supposed I could use if statements to check the image is available in a certain size.

    if (wp_get_attachment_image_src($attachment->ID, 'image_size_name') {
       //display
    }

    It’s not ideal, but should do the job.

    This is a great script aesqe, thanks very much.
    As I hoped, if the uploaded image is smaller than one of the specified sizes, that size is skipped.

    However I would like to be able to get a list of the available sizes for a particular image, anyone know how this can be done?

    Cheers.

    Thread Starter stevecb

    (@stevecb)

    EDIT: This actually isn’t working, a coincidence the resized image was divisible by 18.

    I’ve made some progress with this, its not pretty, but its working-ish.

    I added the following to wp-includes/media.php at ~line 305

    //adhere to basline grid
    	if($new_h % 18) {
    		$new_h = $new_h;
    	} else {
    		$new_h = floor($new_h/18) * 18;
    	}

    This works on the large scale image which is included in the article, but has no effect on the thumbnail image. Any ideas?

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