Home Forums Front-end Issues Cannot get srcset to output anything Reply To: Cannot get srcset to output anything

  • I’m not sure, this is the way I’ve been doing responsive images lately as an example:

    $image_tag = '<img src="'.$image[0].'" width="'.$image[1].
                 '" height="'.$image[2].'" alt="'.$image_alt.
                 '" class="size-'.$image_size.' wp-image-'.$image_id.'" />';
    $image_tag = wp_make_content_images_responsive($image_tag);

    The image tag is formatted the same way as images added into content and I just let WP work out all the details.