You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -12,13 +12,14 @@ and BLOBs to be configured in zope.conf.
12
12
13
13
plone.supermodel handlers are registered.
14
14
15
-
See the ``usage.rst`` doctest for more details.
15
+
See the `image handling section of Plone documentation <https://6.docs.plone.org/classic-ui/images.html#all-image-scales-in-the-srcset>`_ to learn how to
16
+
use the features provided by this package.
16
17
17
18
18
19
Source Code
19
20
===========
20
21
21
-
Note: This packages is licensed under a *BSD license*.
22
+
Note: This packages is licensed under a *BSD license*.
22
23
Please do not add dependencies on GPL code!
23
24
24
25
Contributors please read the document `Process for Plone core's development <https://docs.plone.org/develop/coredev/docs/index.html>`_
This will render the ``img`` with the URLs of all scales configured in Plone, calculating the width
478
-
of each of the scales and will add the ``sizes="90vw"`` attribute.
479
-
The ``sizes`` attribute instructs the browser to render
480
-
the image that best fits, as it will take 90% of the current viewport width.
481
-
482
-
This means that, for bigger screens, the browser will download a bigger scaled image, while for smaller screens, a smaller scaled image is enough.
483
-
484
-
This also means that the developer does not need to worry about creating a specific scale.
485
-
They only need to provide the correct media query to signal the required width.
486
-
487
-
The ``scrset`` method of the ``@@images`` view also takes all other parameters that can be rendered in the ``img`` tag, such as ``title``, ``alt``, or ``loading``:
While using this approach may be useful for projects, using it in reusable add-ons is not recommended, because it may require overriding it to your needs in a project.
502
-
For such cases, use configurable picture variants instead.
0 commit comments