Skip to main content
Keel Docs Showcase

Images and uploads

What it does

  • Tells the image picker where to look, and where images uploaded in the editor go.
  • Can show asset folders under the name of the object they belong to.
  • Sets the size and type of files people can upload in Keel.

Default

The picker searches all assets. Editor uploads go to /dashboard-uploads. Files up to 100 MB in Assets and 25 MB in the editor, of 22 common types.

Options

KeyDefaultWhat it does
image_folder/Asset folder the image picker searches
upload_folder/dashboard-uploadsAsset folder for images uploaded in the editor. Also the starting folder for uploads in Assets.
folder_labels.<pattern>.class–Class of the objects the folders belong to
folder_labels.<pattern>.field–Field whose value is the {value} part of the folder path
uploads.max_mb100Largest file, in MB, uploaded in Assets (1–2048)
uploads.editor_max_mb25Largest image, in MB, uploaded in the editor (1–2048)
uploads.zip_max_mb500Largest total size, in MB, of one Download as ZIP in Assets (1–10240)
uploads.zip_max_files500Most files in one Download as ZIP in Assets (1–5000)
uploads.types22 types, see belowFile extensions people can upload in Assets

The default types: jpg, jpeg, png, webp, avif, gif, svg, mp4, webm, mov, mp3, wav, pdf, doc, docx, xls, xlsx, ppt, pptx, txt, csv, zip.

Example

yaml
keel:
    image_folder: /photos
    upload_folder: /photos/Uploads
    folder_labels:
        '/photos/Properties/{value}': { class: Property, field: code }
    uploads:
        max_mb: 20
        editor_max_mb: 10
        types: [jpg, jpeg, png, webp, avif, gif, pdf]

With folder_labels, the folder /photos/Properties/MR-1042 reads as the name of the property with code MR-1042, and the image library opens in that folder when you pick images for that property.

Good to know about uploads

  • PHP must allow the same size. PHP's upload_max_filesize and post_max_size apply first. If they are lower than uploads.max_mb, uploads fail above the PHP limit. keel:setup --check shows it (for the CLI's PHP; the web server's PHP can differ).
  • The limits and types apply to Keel's own uploaders: Assets and the content editor's image upload. They do not change Pimcore Studio's own asset uploader.
  • Types that can run code (for example php, html, js, exe) can never be allowed. cache:clear fails with a message such as keel.uploads.types: "php" can run code on the server and cannot be allowed.
  • SVG is allowed by default, but an SVG file can contain scripts. Remove svg if people you do not fully trust can upload; the same holds for svgz (not allowed unless you add it).
  • The editor's image upload needs a file with an extension (photo.jpg, not photo).

What admins change in Customize

Nothing.