Why is wp_get_attachment_image not including “full” size in srcset?

srcset assumes that all the images specified in the attribute have the same aspect ratio. As it is unlikely that the original (full) image has an aspect ratio that matches the registered image sizes it should be expected that it will never be part of a srcset attribute.

Update from comments: We also have a max width size restriction of 1600px that can be changed via the max_srcset_image_width filter.

Leave a Comment