Skip to content

Instantly share code, notes, and snippets.

@drewm
Created October 7, 2012 16:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drewm/3848748 to your computer and use it in GitHub Desktop.
Save drewm/3848748 to your computer and use it in GitHub Desktop.
Perch CMS template for <picture> element (based on example from HTML5 Doctor)
<picture alt="<perch:content type="text" id="alt" label="Alt" />">
<source src="<perch:content type="image" id="image" label="Image" width="800" />" media="min-width:800px">
<source src="<perch:content type="image" id="image" label="Image" width="480" />" media="min-width:480px">
<source src="<perch:content type="image" id="image" label="Image" width="200" />">
<img src="<perch:content type="image" id="image" label="Image" width="480" />" alt="<perch:content type="text" id="alt" label="Alt" />">
</picture>
@alexpi
Copy link

alexpi commented Dec 30, 2012

Do you have to upload images for each resolution, or does perch resizes and makes four copies automatically?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment