PrestaShop Developer Conference
PrestaShop Developer Conference
Paris, France - November 6, 2024
Let's talk code, commerce and open source.

Notice: You are browsing the documentation for PrestaShop 9, which is currently in development.

You might want to read the documentation for the current version, PrestaShop 8. Read the current version of this page

ImagePreviewType

This form type is used to display an image value without providing an interactive input to edit it. It is based on a hidden input so it could be changed programmatically, or used just to display an image in a form.

Type options

Option Type Default value Description
type string hidden
image_class string img-fluid

Code example

$builder->add('cover_thumbnail', ImagePreviewType::class, [
    'label' => false,
])

Preview example

ImagePreviewType rendered in form example