[wp-trac] [WordPress Trac] #35108: Responsive images blurry - srcset attribute doesn't include full size version

WordPress Trac noreply at wordpress.org
Wed Dec 16 10:38:18 UTC 2015


#35108: Responsive images blurry - srcset attribute doesn't include full size
version
-------------------------------+------------------------------
 Reporter:  nicasi             |       Owner:  joemcgill
     Type:  defect (bug)       |      Status:  reviewing
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Post Thumbnails    |     Version:  4.4
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+------------------------------

Comment (by nicasi):

 Replying to [comment:2 joemcgill]:
 > Out of curiosity, can you tell me a little bit more about your setup?
 What image sizes do you have available on your server, what size image is
 showing up in the `src` attribute for your image, and what is the layout
 size of this featured image when viewed at the widest possible breakpoint
 (i.e., not scaled down in a mobile layout)?

 Hi Joe,

 I have the default image sizes (150x150 cropped, 300x300 max, 768x768 max,
 1024x1024 max and full size). I can understand the need of a maximum in
 case a user uploads for example a +3000px image. In my case it might be
 interesting to add this maximum resolution (eg 1600 or a custom one) to
 the default sizes via add_image_size.

 In my test layout I want to display the featured image as a full viewport
 width image. If I upload a 1920px wide image a call to
 the_post_thumbnail() (without arguments or with 'full') gives me a src of
 the full width image. However the srcset has only 300, 768 and 1024. Since
 the src is ignored and only the images in the srcset are used the biggest
 available image is 1024 wide. To display a full width image at 1920px wide
 this is insufficient.

 I can understand the need of a maximum when using the_post_thumbnail()
 without arguments but in my opinion the_post_thumbnail('full') should put
 the original upload in the srcset too.

 Kind regards,
 Kevin

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35108#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list