Reference

Formats and limits for assets

Which files an asset can be depends on how it arrives. The Asset Library itself takes images only; documents and other files go in through a file field on an entry. Images imported from a web address must be JPEG, PNG, or WebP. Beyond that, the limits are the ones each field sets: its formats, its dimensions, and for files, the allowed types and maximum size.

Which files an asset can be depends on how it arrives. The Asset Library itself takes images only; documents and other files go in through a file field on an entry. Images imported from a web address must be JPEG, PNG, or WebP. Beyond that, the limits are the ones each field sets: its formats, its dimensions, and for files, the allowed types and maximum size.

Requirements

A role that can manage the Asset Library to upload. To change a field's limits: a role that can edit the collection's fields.

By route

RouteAcceptsLimits
Upload to the libraryImages only, such as JPEG, PNG, and WebPNo size limit set by Sonta; the server's upload limit applies
Upload into an entry's image or gallery fieldThe formats the field allowsThe field's formats; no separate size limit
Upload into an entry's file fieldThe file types the field allows, such as PDF or DOCXThe field's maximum file size, in MB
Import from a web addressJPEG, PNG, WebPhttps only; address up to 2,048 characters; public servers only

A field with no limits set accepts any file for its kind.

What a field can limit

FieldSettings
ImageAllowed formats, default format, named sizes with width and height, default size, minimum and maximum width and height, required
GalleryAllowed formats, named sizes, minimum and maximum width and height, required
FileAllowed file types, maximum file size in MB (at least 0.1), required

Sizes and formats generated on upload

An image uploaded to the library can be given output formats and named sizes, such as a thumbnail and a large version. One version is generated for each format and size, and an image field shows the default format and size it is set to. A listing photo uploaded once can serve a small card on a search page and a full-width picture on the listing page.

Notes and limitations

  • Documents need a file field. A PDF cannot be uploaded to the library directly; add a file field to the collection and upload it there.
  • Names and tags. A stored file name can be up to 255 characters, and each tag up to 100.
  • No version history. Earlier versions of an asset are not kept. To change a picture, replace the file on the asset or attach another.

For the steps, see Upload a file or image, Import media from a URL, and Attach an asset to an entry.

Frequently asked questions

Can I upload a PDF to the Asset Library?
Not to the library directly, which takes images only. Add a file field to the collection and upload the PDF there.
Is there a maximum image size?
Sonta sets no size limit for images; the server's upload limit applies. File fields can set their own maximum size.
Which formats can I import from a web address?
JPEG, PNG, and WebP.