This addon install picturefill in Plone and provide a suite of tools to display images from different kind of components such as brain, dexterity object or archetypes object.
version: https://github.com/scottjehl/picturefill/tree/00936788c29059834bc78b119fc45ebc3bc056eb
This addon can be installed has any other addons. please follow official documentation
in template:
tal:content="structure myimage_object/@@polyfill"
in python:
from collective.picturefill.interfaces import IPictureFill
IPictureFill(brain)()
CSS: You should use this tricks if you want in your theme that picturefill fit the exact size of the container:
div[data-picture] img{
width: 100%;
}
- JeanMichel FRANCOIS aka toutpt <toutpt@gmail.com>