Skip to content

Pictures, files and videos in custom data

A custom-data field can hold a picture, a file (a PDF, a certificate) or a video. Whatever the field is, you no longer paste an address into a bare box: you upload the file, choose it from your media library, or still type or paste an address, and you see a small preview.

The control is opt-in: a field gets it only when its setting says so. A text or URL field you already have stays a plain text box, whatever it is called, until you change that setting.

  1. The field’s own setting, “What this field holds”. In the type’s field list, open a text or URL field, then Validation rules, then What this field holds: Plain text (the default), Picture, File or Video. You can change it at any time, also on a field that already has entries; it never changes an entry.
  2. When you create a new field, its name pre-selects the setting so you can see the choice: a new field called image_url, photo, banner, logo, cover, hero or slide starts as Picture, and one called file_url, pdf_url or belge_url as File. You can change it before you save. A field called title never starts as one.
  3. A File field (the library file type) always has the control, whatever it is called.

The same applies to metafields on products, categories, pages, customers and every other kind of record: choose What this field holds when you define the metafield, and the value box on the record shows the control. The setting of an existing metafield definition cannot be edited after it is created.

In an entry, the field shows a preview square, the address, and three actions.

  • Upload opens your computer’s file chooser. You can also drag a file onto the field or paste a picture from the clipboard. A picture field accepts pictures only; a file or video field accepts any file the library accepts.
  • Library opens your media library: pick an existing file, upload a new one there, or use the From a URL tab for an address on another site.
  • Remove (the cross) clears the field. The file itself stays in your library.

You can still type or paste an address in the box. Use https://…, or a path on your own site that starts with a single /. Addresses starting with //, javascript: or data: are refused. An address on another site is marked External: the file stays there and is not in your library.

If a picture cannot be loaded, the preview turns into a red “can’t be loaded” mark and the address is kept, so you can fix it instead of losing it.

Right after you upload or choose a picture, the field asks you to describe it. The description is the picture’s alt text in your library, so it is the same everywhere the picture is used. It helps visitors who cannot see the picture and search engines. Leave the box after typing to save it.

A field that is a list of pictures, files or videos is a gallery.

  • Choose from library lets you tick several files at once.
  • Upload files (or dropping several files on the gallery) uploads them all and adds them in order.
  • Type an address and Add it.
  • Drag a tile to reorder, or use the move earlier / move later buttons, which also work with the keyboard. Remove takes one out.

When your store has more than one language and the type is translatable, each language page shows a picture field with three choices:

  • Use the (default language) picture: nothing is stored for this language; visitors see the default picture.
  • Its own picture: upload or choose one for this language.
  • No picture in this language: visitors in this language see nothing here. Pick this on purpose only; if a language is left on “no picture” by mistake, the picture is missing on your site in that language.

Per-language pictures work for text fields and File fields. URL fields are not translated per language.

  • Anything the admin shows as a picture is stored as the address /img/… without any version suffix; a ?v= token is only added when the picture is displayed.
  • Deleting a file from the library does not rewrite the fields that use it; a file field shows “This file is no longer in your library”, and a text field shows the can’t-be-loaded mark.
  • Converting a text field into a File field is not possible yet: a field’s type cannot change after it is saved.