@plone/volto 18.27.2 → 18.27.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -17,6 +17,16 @@ myst:
17
17
 
18
18
  <!-- towncrier release notes start -->
19
19
 
20
+ ## 18.27.3 (2025-10-01)
21
+
22
+ ### Bugfix
23
+
24
+ - Fix image rerender on page edit. @calinvladth [#7391](https://github.com/plone/volto/issues/7391)
25
+
26
+ ### Internal
27
+
28
+ - Acceptance test for Teaser Block Refresh Source Content @Tishasoumya-02
29
+
20
30
  ## 18.27.2 (2025-09-29)
21
31
 
22
32
  ### Bugfix
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  }
10
10
  ],
11
11
  "license": "MIT",
12
- "version": "18.27.2",
12
+ "version": "18.27.3",
13
13
  "repository": {
14
14
  "type": "git",
15
15
  "url": "git@github.com:plone/volto.git"
@@ -15,7 +15,6 @@ import UniversalLink from '@plone/volto/components/manage/UniversalLink/Universa
15
15
  import FormFieldWrapper from '@plone/volto/components/manage/Widgets/FormFieldWrapper';
16
16
  import Image from '@plone/volto/components/theme/Image/Image';
17
17
  import loadable from '@loadable/component';
18
- import { flattenToAppURL } from '@plone/volto/helpers/Url/Url';
19
18
  import { validateFileUploadSize } from '@plone/volto/helpers/FormValidation/FormValidation';
20
19
  import { defineMessages, useIntl } from 'react-intl';
21
20
  import { toast } from 'react-toastify';
@@ -96,11 +95,18 @@ const FileWidget = (props) => {
96
95
  }
97
96
  }, [value]);
98
97
 
99
- const imgsrc = value?.download
100
- ? `${flattenToAppURL(value?.download)}?id=${Date.now()}`
101
- : null || value?.data
102
- ? `data:${value['content-type']};${value.encoding},${value.data}`
103
- : null;
98
+ const imgAttrs = React.useMemo(() => {
99
+ const data = {};
100
+ if (value?.download) {
101
+ data.item = {
102
+ '@id': value.download.substring(0, value.download.indexOf('/@@images')),
103
+ image: value,
104
+ };
105
+ } else if (value?.data) {
106
+ data.src = `data:${value['content-type']};${value.encoding},${value.data}`;
107
+ }
108
+ return data;
109
+ }, [value]);
104
110
 
105
111
  /**
106
112
  * Drop handler
@@ -175,7 +181,7 @@ const FileWidget = (props) => {
175
181
  <Image
176
182
  className="image-preview small ui image"
177
183
  id={`field-${id}-image`}
178
- src={imgsrc}
184
+ {...imgAttrs}
179
185
  />
180
186
  ) : (
181
187
  <div className="dropzone-placeholder">