From a06f9743ab639b614418c381538e8c27dc864654 Mon Sep 17 00:00:00 2001
From: "Jens W. Klein"
+ There are three modes to scale an image: Scaling methods do never stretch/distort the image in one direction only.
+ Scales to the requested dimensions without cropping.
+ The resulting image may have a different size than requested.
+ This option requires both, width and height, to be specified.
+ Does not scale up. [from doc-string]
+
+ Here direction is not explicit set, it uses by default Deprecated spellings:
+ Scales the relatively largest dimension up to the required size.
+ Despite the alternative spelling, I see no cropping happening. [from doc-string]
+ Deprecated spellings:
Examples with direction/mode
+ scale
, cover
and contain
.
+ Mini
+ Mini direction=scale
+ direction="scale"
.
+ keep
, thumbnail
.
@@ -79,6 +93,11 @@
Mini direction=cover
+ scale-crop-to-fill
, up
.
@@ -86,7 +105,11 @@
Mini direction=contain
-
Deprecated spellings: scale-crop-to-fit
, down
.
@@ -97,9 +120,7 @@
Temporary note: - Picture tags only work on Plone 6, with several other branches merged. - See coredev. - If not available (like on Plone 5.2), an ordinary image tag is created. + Picture tags only work on Plone 6. If not available (like on Plone 5.2), an ordinary image tag is created.
- There are three modes to scale an image:
- scale
,
- cover
- and
- contain
.
-
Scaling methods do never stretch/distort the image in one direction only.
+- Scales to the requested dimensions without cropping. - The resulting image may have a different size than requested. - This option requires both, width and height, to be specified. - Does not scale up. -
-
- Here direction is not explicit set, it uses by default
- direction="scale"
.
-
Deprecated spellings:
- keep
,
- thumbnail
.
-
+ - Scales the relatively largest dimension up to the required size. - Despite the alternative spelling, I see no cropping happening. -
-Deprecated spellings:
- scale-crop-to-fill
,
- up
.
-
+ - Starts by scaling the relatively smallest dimension to the required size and crops the other dimension if needed. -
-Deprecated spellings:
- scale-crop-to-fit
,
- down
.
-
+ + srcset allows the browser to select the correct image, depending on the space the image has on a page. +
++ To do so, the @@images view provides a srcset method, that will output the full srcset of this image, using all available image scales. It has as required parameter the value of the sizes attribute that the user of this method has to provide and will be output as is in the generated HTML. +
+
+
+
+
+
+
+