incubator-pagespeed-mod
incubator-pagespeed-mod copied to clipboard
Add srcset as a possible category for UrlValuedAttribute
In some cases, we need to put srcsets for image into a custom attribute, such as data-srcset.
Unfortunately, those images cannot be optimized with ModPagespeed at the moment. Adding the configuration ModPagespeedUrlValuedAttribute img data-srcset image does not work, as data-srcset does include both the image url as well as the image size. Thus, it would be nice if there was a dedicated category for srcsets in for the UrlValuedAttributes.
Same as nginx #1608
Hi @oschaaf Yes, is a improvement, like data-src work as img category. As you know, I´m not a developer but I think most of the work is done as is the same issue as srcset label. Perhaps an other issue/improvement with the lazyload_images filter because it load images in onload event, no matter if LazyloadImagesAfterOnload is set to on or off and Pagespeed Insigths don´t recognize that images are lazyloaded. Because of that I´m using a wordpress plugin based on lazysizes that need data-src and data-srcset
Hi @oschaaf. Brilliant that you seem to be working on this. Does it require further testing?
Hi @andymathieson Sure, none of us take care of all use cases. This PR is a transient one. The definitive PR is pending to commit. I have it in production, so it works. But my site is a small web, maybe some use cases are not covered.
@Lofesa Thanks for the reply. We require the data-srcset capabilty so will probably fire up a test server and give it a spin. Hopefully will be commited to master soon as I'm sure this is a highly needed feature.
Hi @andymathieson If you fire a test server, apply the PR #1929 , the definitive pacht to solve the issue. This PR solves data-srcset, amp img srcset and add a UrlValuedAttibute srcset category, so you can use others elements: ModPagespeedUrlValuedAttribute img data-wpfc-original-srcset srcset
Hi @Lofesa Will this patch be merged into the master anytime soon in the future?
Hi @andymathieson I don´t know when the patch be merged and when a new release that include it be libered. Maybe @oschaaf can say some about this.
It's been almost a year without any response.
Any updates? @oschaaf
Please provide updates will this be merged to master ?