[Plugin: Advanced Custom Fields] Display custom image-size
I have some issues with Advanced Custom Fields plugin. The custom field image uses the dimensions of my predefined thumbnail-size, but I want it to use the medium-size. I tried some of the advises from the support-board and put the code into my template file (see below), but it doesn’t have any effect no matter what I’m trying. Help is much appreciated.
<?php $attachment_id = get_field('field_name'); $size = "medium"; // (thumbnail, medium, large, full or custom size) $image = wp_get_attachment_image_src( $attachment_id, $size ); // url = $image; // width = $image; // height = $image; ?> <img src="<?php echo $image; ?>" />
- The topic ‘[Plugin: Advanced Custom Fields] Display custom image-size’ is closed to new replies.