WordPress and responsive images

You have many options in the HTML markup to define responsivenes. One would be to use srcset and sizes new markup. You may also use picture markup tag if you need more control. Your WordPress code may look like this: <?php $img_src = wp_get_attachment_image_url( $attachment_id, ‘medium’ ); $img_srcset = wp_get_attachment_image_srcset( $attachment_id, ‘medium’ ); ?> <img…

Tagged