Skip to content

abcnews/interactive-responsive-image-frame

Repository files navigation

interactive-responsive-image-frame (tech preview)

A fairly naive, art-directed responsive image solution using embedded iframes.

This is a stop-gap until our CMS can support art directed responsive images.

Overview

This is a fully Javascript solution, and doesn't use any native features like the <picture> element.

On load, it:

  1. Queries the iframe size and fetches the relevant image document from Terminus
  2. Then uses the original image rendition for display.

Therefore, please ensure your images are appropriately compressed before uploading.

Usage

Embed this iframe with two ContentIDs, one for small screens, and one for large screens:

/?abcnewsembedheight=600&small=106077488&large=106077486

For development, specify an env with &env=preview

About

A fairly naive, art-directed responsive image solution using embedded iframes.

Resources

License

Stars

Watchers

Forks

Packages

No packages published