[wp-trac] [WordPress Trac] #34532: Responsive images: calculate the image baseurl from the original image `src`.
WordPress Trac
noreply at wordpress.org
Mon Nov 2 12:11:51 UTC 2015
#34532: Responsive images: calculate the image baseurl from the original image
`src`.
--------------------------+--------------------
Reporter: azaozz | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.4
Component: Media | Version: trunk
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+--------------------
Comment (by aaroncampbell):
I have some reservations on this one. It looks to me like there will no
longer be a call to `wp_upload_dir()` anywhere, which means that we're
making the assumption that because one image size is stored in a specific
places that all other sizes of that same image are also stored there.
That's definitely the case the vast majority of the time, but it's
certainly possible to store them separately.
So what happens if we generate a srcset that has some invalid URLs, and
add it to an image? At certain sizes does the image disappear? Or does it
simply fall back to showing the image that was already there? If the
latter, then it's not a huge deal to me. Basically if means that if you
store images in a non-standard way, then you need to write some code to
make sure of this new functionality but nothing breaks.
If it's the former though, if there's potential of breakage, then I think
we need to step back and think about it a bit. Especially since in this
case we are '''modifying existing user data without telling them or
requiring any action on their part at all'''. If existing posts begin to
NOT show an image at a particular viewport size, when they worked before,
that's a HUGE deal. (I'm not as worried about it, but even without
breakage I assume that having any incorrect URLs will cause additional
404s, something that is already not especially light-weight in WordPress.)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34532#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list