-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
enhancementNew feature or requestNew feature or request
Description
We should be able to pass an option to put the original size in the sizes attribute.
Example :
umanit_image_figure_lazy_load(
image.path,
'small_thumbnail',
'tiny_thumbnail',
['thumbnail', 'large_thumbnail'],
'image alt',
'img img--cover img--zoom',
'original', <- pass the original size
'class-figure',
'Figcaption text',
'class-figcaption',
'low'
)
When the 'original' size is requested we should insert the following pattern :
sizes= "(max-width: [image width]) 100vw, [image width]"
We also need to implement security for a maximum size (When a customer uploads an image that is too big for example).
umanit_twig_image:
use_liip_default_image: false
class_selector: lazy
placeholder_class_selector: lazy-placeholder
blur_class_selector: lazy-blur
max_size: 1600px
If an image is requested with a larger width the pattern become :
sizes= "(max-width: [image parameter max width]) 100vw, [image parameter max width]"
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request