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

Support for picture elements #1

Open
anthonyjb opened this issue Feb 24, 2020 · 0 comments
Open

Support for picture elements #1

anthonyjb opened this issue Feb 24, 2020 · 0 comments
Labels
on roadmap Accepted on to the roadmap for the given milestone
Milestone

Comments

@anthonyjb
Copy link
Member

Support for the <picture> element is now in place across all the browsers we intend to support for CotnentTools 2 (sorry no IE11 support). Image support (especially responsive images) in ContentTools has previously been very limited with just the <img> tag being available. We've typically worked around these limitations by using a combination of image fixtures and ContentFlow to provide different upload options at different browser widths but it's far from ideal.

Supporting the <picture> element would allow ContentTools to provide a modern approach for inserting imagery into pages with the option to add multiple versions (crops, formats, qualities, etc.) of the picture for different media queries.

As part of this update we will look to change the current approach of using a division to represent images within the page when editing, this approach was used at the time to allow before and after elements to be used within the editable image element, but whilst it works and was a simple solution at the time for presenting additional image information (e.g size) it causes lots of problems for developers and designers integrating ContentTools within their content.

I'd love to hear from people how we might best approach a UI to allow users to support generating multiple versions of an image to meet different media queries. We'd ideally need to support for:

  • Manually control, allowing a user to configure a versions of an image for multiple predefined media queries (media queries would be predefined by the developer/design team to meet the requirements of the content).
  • Automatic generation, a way to plugin image creation tools like cloudinary or H51 to automatically generate URLs/images for media queries the user does not manually configure (can see this being the most common scenario for a lot of our clients).
  • Safe fall backs for when an image on it's own will do. There's plenty of times when I've found simply setting the max-width of the image to 100% is all I've needed. It's not a good solution clearly, but it should be possible to take this approach, if only to help with the transition over from ContentTools 1.x to 2.
@anthonyjb anthonyjb added the on roadmap Accepted on to the roadmap for the given milestone label Feb 24, 2020
@anthonyjb anthonyjb added this to the 2.0.0 milestone Feb 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on roadmap Accepted on to the roadmap for the given milestone
Projects
None yet
Development

No branches or pull requests

1 participant