| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 2993935-2.patch | 2.43 KB | dww |
| pathologic-picture-source-srcset-support-7.x.patch | 2.44 KB | mstrelan | |
| pathologic-picture-source-srcset-support-8.x.patch | 2.39 KB | mstrelan |
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 2993935-2.patch | 2.43 KB | dww |
| pathologic-picture-source-srcset-support-7.x.patch | 2.44 KB | mstrelan | |
| pathologic-picture-source-srcset-support-8.x.patch | 2.39 KB | mstrelan |
Comments
Comment #2
dwwThanks for the issue, patch, and including test coverage for the change! This makes sense to me. If we support
<img>srcattributes, we should handlesrcset, too (now that it exists!).Here's a re-roll for modern 8.x-1.x branch.
I'll try to get this in before the next release. Just don't want to make trouble for #2418369: Internal URL handling (language prefixes, base://, ...) which is a bigger fish to fry...
Comment #4
dwwUpon further review, this isn't going to conflict with #2418369: Internal URL handling (language prefixes, base://, ...), so let's get this in. Committed and pushed to 8.x-1.x.
Thanks @mstrelan!
Comment #6
dippers commentedThis patch seems to introduce a problem where responsive images are handled using a simple img tag and extended srcset attribute. Drupal's core responsive image module will output image tags of this type if "there is only one source tag with an empty media attribute".
A srcset on an image tag will be of the form
srcset="elva-fairy-320w.jpg, elva-fairy-480w.jpg 1.5x, elva-fairy-640w.jpg 2x". Since pathologic treats srcset the same as any other url attribute it does not handle the case of multiple sources or sizes. In this case pathologic converts the first url and then treats the rest of the string as a url parameter and encodes as such.Since Drupal generates img srcsets it is really necessary for Pathologic to deal with them.