The HTML “picture” Element and Picturefill JavaScript

If you need to use the HTML element <picture> in your HTML markup, you need to help the browsers that don’t understand it yet. Most browsers still don’t support <picture>.

In order to solve the problem, you can use JavaScript to help browsers understand your code. If you did so, you’d be assuming that your users have JavaScript activated in their browser. If not, they’d not be able to understand your <picture> elements.

At any rate, if you decide to use <picture> and want to make sure it’s supported by all/most browsers today, use the Responsive Image Polyfill below to take care of the problem.

 

Author: John Raschedian

Web Developer