Support

Account

Home Forums General Issues adding a class to image attachment Reply To: adding a class to image attachment

  • Ah, I mixed things up.

    This is what I have now:
    
    $image = get_field('card1_image');
    	$size = 'full'; // (thumbnail, medium, large, full or custom size)
    	if( $image ) {
    		echo wp_get_attachment_image( $image, $size, array ('class' => 'rounded-top' ) );
    	}

    and that does not seem to work…