Yet another srcset question ;)
-
Mika, really awesome plugin, btw!
I just set up with DreamObjects and am using the CDN and your plugin. I love it and everything works great except for this dreaded srcset issue.
The regular img src tag is properly showing up as the CDN alias URL, which is great. But the theme / template I’m using is also using srcset tags since the page is responsive (and I’d really rather not change that).
Has there been any progress on being able to change these srcset tags? Is there anything you can point me towards to look into it further myself, to help out a bit?
Update: Does your code really need to check which size to write in, or can it just do a regex to change the domain name / subdomain to rewrite that only (ignoring the URI / specific image path and size)? Not that I want them disabled, but they talk about disabling srcsets altogether in this post – maybe there is something to be gleaned on how to replace the domain only in here? (https://www.ads-software.com/support/topic/is-it-possible-to-disable-the-responsive-image-srcset-on-wordpress-44?replies=25)
Thanks again!
———-
Here’s the piece of the HTML that is in question (it’s the featured image of a post, not a gallery or anything):<img width="778" height="438" src="https://cdn.mysite.com/wp-content/uploads/2016/06/bar-wall.jpeg" class="attachment-clean-box-featured size-clean-box-featured wp-post-image" alt="bar-wall" srcset="https://www.mysite.com/wp-content/uploads/2016/06/bar-wall.jpeg 778w, https://www.mysite.com/wp-content/uploads/2016/06/bar-wall-300x169.jpeg 300w" sizes="(max-width: 778px) 100vw, 778px">
- The topic ‘Yet another srcset question ;)’ is closed to new replies.