Support

Account

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

  • That is the same issue, you need 4 values, not 3.

    So try this:

    $image = get_field('quick_ship');
    	$size = 'full'; // (thumbnail, medium, large, full or custom size)
    	if( $image ) {
    		echo wp_get_attachment_image( $image, $size, "", array ('class' => 'quick-ship' ) );
    	}