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: docs/classic-ui/images.md
+20-11Lines changed: 20 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,8 @@ We will use the image object as context in the following examples.
25
25
26
26
## Default scales
27
27
28
-
In `/@@imaging-controlpanel` Plone allows you to configure which scales are available and what dimensions they should have. By default we have the following scales configured:
28
+
In `/@@imaging-controlpanel` Plone allows you to configure which scales are available and what dimensions they should have.
29
+
By default, we have the following scales configured:
If you only have the cached image name from an URL and need to get the image scale, unfortunately you can't use restrictedTraverse(), as this will not be able to resolve the scale. But you can use this workaround, by calling the `publishTraverse` method in `ImageScaling` directly:
218
+
If you only have the cached image name from an URL and need to get the image scale, unfortunately you can't use `restrictedTraverse()`, as this will not be able to resolve the scale.
219
+
But you can use this workaround, by calling the `publishTraverse` method in `ImageScaling` directly:
218
220
219
221
```python
220
222
import re
@@ -256,26 +258,30 @@ To access image scales, which are normally not accessible to the current user, o
256
258
257
259
258
260
(classic-ui-images-responsive-image-support)=
261
+
259
262
## Responsive image support
260
263
261
264
Plone supports the generation of picture tags with `srcset`s for image optimization.
262
-
Additionally you can define [media queries](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries) for [art direction](classic-ui-images-responsive-image-support-art-direction) and further optimization.
265
+
Additionally, you can define [media queries](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries) for [art direction](classic-ui-images-responsive-image-support-art-direction) and further optimization.
263
266
264
267
The configuration allows you to define different picture variants, such as `Large`, `Medium`, or `Small`.
265
-
Users can choose from them in editors like TinyMCE and Developers can use them in templates.
268
+
Users can choose from them in editors, such as TinyMCE, and developers can use them in templates.
The default configuration covers image size optimization and will provide the browser with the needed information to load the optimal image size.
284
+
The default configuration covers image size optimization, and will provide the browser with the needed information to load the optimal image size.
279
285
280
286
```json
281
287
{
@@ -306,7 +312,7 @@ The default configuration covers image size optimization and will provide the br
306
312
### Optional settings
307
313
308
314
The `sourceset` property is an array and can have more than one entry.
309
-
If we have the following two entries, the `image_srcset`outputfilter will generate one `source` tag for each entry and an additional `img` tag from the last entry.
315
+
If we have the following two entries, the `image_srcset`output filter will generate one `source` tag for each entry and an additional `img` tag from the last entry.
310
316
311
317
```json
312
318
{
@@ -328,7 +334,9 @@ If we have the following two entries, the `image_srcset` outputfilter will gener
0 commit comments