diff --git a/src/bundle/Resources/views/themes/admin/ui/field_type/edit/ezimage.html.twig b/src/bundle/Resources/views/themes/admin/ui/field_type/edit/ezimage.html.twig
index de6ed8be2b..20fb91cdf8 100644
--- a/src/bundle/Resources/views/themes/admin/ui/field_type/edit/ezimage.html.twig
+++ b/src/bundle/Resources/views/themes/admin/ui/field_type/edit/ezimage.html.twig
@@ -45,12 +45,18 @@
{{ 'content.field_type.ezimage.preview'|trans|desc('Preview') }}
+
+ {% if version_info is defined %}
+ {% set content_id = version_info.contentInfo.id %}
+ {% set version_no = version_info.versionNo %}
+ {% endif %}
+
{{ ibexa_render_component_group(
'image-edit-actions-after',
{
'fieldDefinitionIdentifier' : form.parent.vars.value.fieldDefinition.identifier,
- 'contentId' : app.request.get('contentId'),
- 'versionNo' : app.request.get('versionNo'),
+ 'contentId' : content_id ?? app.request.get('contentId'),
+ 'versionNo' : version_no ?? app.request.get('versionNo'),
'disabled': readonly ? true : false,
}
) }}
diff --git a/src/bundle/Resources/views/themes/admin/ui/field_type/edit/ezimageasset.html.twig b/src/bundle/Resources/views/themes/admin/ui/field_type/edit/ezimageasset.html.twig
index 78356d9423..647d903256 100644
--- a/src/bundle/Resources/views/themes/admin/ui/field_type/edit/ezimageasset.html.twig
+++ b/src/bundle/Resources/views/themes/admin/ui/field_type/edit/ezimageasset.html.twig
@@ -135,12 +135,18 @@
{{ 'content.field_type.ezimage.preview'|trans|desc('Preview') }}
+
+ {% if version_info is defined %}
+ {% set content_id = version_info.contentInfo.id %}
+ {% set version_no = version_info.versionNo %}
+ {% endif %}
+
{{ ibexa_render_component_group(
'image-edit-actions-after',
{
'fieldDefinitionIdentifier' : form.parent.vars.value.fieldDefinition.identifier,
- 'contentId' : app.request.get('contentId'),
- 'versionNo' : app.request.get('versionNo'),
+ 'contentId' : content_id ?? app.request.get('contentId'),
+ 'versionNo' : version_no ?? app.request.get('versionNo'),
'disabled': readonly ? true : false,
}
) }}