Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images in view layer #9

Open
AndySky21 opened this issue Apr 3, 2015 · 2 comments
Open

Images in view layer #9

AndySky21 opened this issue Apr 3, 2015 · 2 comments

Comments

@AndySky21
Copy link
Contributor

The section regarding images should be completely revised.
The proposed model: attribute values take into no account backward compatibility, and they will require JS polyfill in order to provide basic page integrity.
However, this is not the worst thing.
How does your proposal deal with modern scenarios of responsive images? I mean, both in @srcset viewport responsivity and in <picture>/<source> art direction. There could be several different URI for an image, based on resolution and/or size. How would controller tell model the correct resource to be downloaded and shown in view layer?
You should find an alternative to hardcoded image URIs without forcing authors to use specific names for files (there's a number of reasons why this idea would fail). Also consider that file selection cannot rely upon requests made by control layer, as the layout can vary and therefore images are requred to "respond" to viewport/ events (such as browser window resize, portable devices re-orientation, zooming etc.)

@mozumder
Copy link
Owner

mozumder commented Apr 5, 2015

Yes I got rid of the model: URI. They weren't backwards compatible.

For responsive images, the APIs should provide the data as is, to be filled into SRCSET or PICTURE elements. A more advanced author could use Javascript to build these SRCSET or PICTURE elements from basic models if they wish.

@AndySky21
Copy link
Contributor Author

A more advanced author could use Javascript to build these SRCSET or PICTURE elements from basic models if they wish.

I hope authors will not have to use JS where they can currently avoid it! 😄
However, I just want you to think about the complexity of adaptive images. You could have several <source> elements, each with its own @srcset, then followed by <img> again specified with srcset attribute or even with sizes.
Navigating the model will have to update all elements properly (or even a subset in case not all images have the same requirements). The API should interface this structure properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants