Current time: 01-28-2021, 09:40 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Optimised images defined using srcset and parameters not used in tests
08-11-2020, 09:31 PM
Post: #3
RE: Optimised images defined using srcset and parameters not used in tests
Thanks for the fast moderation and reply. I've been looking at this (please bear in mind I'm a Business Analyst, not a developer) and it appears we are using the <Picture> element. Even with preserving the original user agent it appears that the jpg images are being displayed, not webp.

Here is the snip of code used to display the image used in the above example (no trade secrets, this comes from Chrome Dev Tools). The only bit I've edited is to put "HTTP:" in front of each image URL so it will work locally. I saved this snip as an HTML file and have been able to run it locally and see a WebP image displayed in Chrome, and a JPEG in IE so this removes any user agent sniffing from our code base (I don't know how the hosted image solution, Contentful, might work).

Code:
<picture class="c-picture">
<source srcset="http://images.ctfassets.net/bz0fvtkbk5r1/1RTV7epqaHfVe9hr1xOCfg/dd427dae55c6d6f208065f32da2bb865/PD859BCR-main.jpg?q=80&w=550&fm=webp" type="image/webp">
<img alt="Lydia Culotte Jumpsuit in Black/Cream by Bravissimo Dresses " src="http://images.ctfassets.net/bz0fvtkbk5r1/1RTV7epqaHfVe9hr1xOCfg/dd427dae55c6d6f208065f32da2bb865/PD859BCR-main.jpg?q=80&w=550" class="c-image">
</picture>

Here's the link to the test with 'Preserve original user agent' set. https://webpagetest.org/result/200811_CG...7e93df09e/
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Optimised images defined using srcset and parameters not used in tests - Andy Clarke - 08-11-2020 09:31 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)