Skip to content

Commit 1688bc2

Browse files
authored
Merge pull request plone#1196 from plone/mrtango-images-cleanup-note
image handling: add cleanup note
2 parents 34c6ce8 + db93f34 commit 1688bc2

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/bin
33
/include
44
/lib
5+
/lib64
56

67
# Generated files
78
pyvenv.cfg

docs/classic-ui/images.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ It can be resolved as follows:
7070
This is useful for caching URLs in Varnish or the browser.
7171
In case the uploaded image or scale definitions have changed, they will be saved again under a different UID.
7272
This changes the URL and forces either the browser, or a cache proxy such as Varnish, to fetch it again.
73+
When a scale has changed, the old stored entry in the annotation will be deleted after 24 hours.
74+
If one changes an image which is used in multiple pages, the updated versions will only be shown after a restart of the Plone instance, saving the pages again, or after 24 hours.
7375

7476

7577
(classic-ui-images-image-tag-label)=
@@ -91,7 +93,7 @@ To get a specific image size:
9193
from plone import api
9294

9395
scale_util = api.content.get_view("images", context, request)
94-
tag = scale_util.tag("image", width="600", height="200")
96+
tag = scale_util.tag("image", width=600, height=200)
9597
```
9698

9799
The complete list of arguments with their default values is shown in the following example.
@@ -165,7 +167,7 @@ Instead of using the configured named scales, you can get an HTML tag with any s
165167
from plone import api
166168

167169
scale_util = api.content.get_view("images", context, request)
168-
tag = scale_util.scale("image", width="600", height="200")
170+
tag = scale_util.scale("image", width=600, height=200)
169171
```
170172

171173
(classic-ui-images-using-image_scale0-in-templates-label)=

0 commit comments

Comments
 (0)