Media libraries

Set upload folders, accepted file formats, image limits, and crop ratios.

Put these keys under studio.media in the library folder’s navigation file, alongside studio.view: media. The library contains editable content records. Its upload directory holds the image files those records point to.

SettingValues and effect
kindimage (default) or video. A video library manages YouTube records and optional poster images.
directoryUpload folder relative to studio.mediaRoot. Defaults to images/uploads. With mediaRoot: src/assets and directory: library, uploads go into src/assets/library/.
formatsAllowed image extensions. The default is [jpg, jpeg, png, webp, gif]. Studio checks uploaded image data as well as its extension. Choose a subset of these formats to restrict uploads.
maxBytesMaximum byte length of an uploaded image. Defaults to 10,485,760 bytes (10 MiB). A smaller value lowers the limit.
imageAspectRatioCrop ratio for the main image. Accepts a positive number or a ratio string such as "4:3" or "16/9". Omit it to let editors choose the crop shape.
thumbnailAspectRatioRatio for the library thumbnail. Cards fall back to 4:3 for images and 16:9 for videos. A separate thumbnail crop is available for supported still images when the ratios differ and the record schema supports a thumbnail.

For a photo library, model title and image with src and alt. Studio also understands thumbnail with its own src and alt, plus categories, credit, visible, and order. A video record uses youtubeId and can have a poster in image. An editor can select a hidden library item for use on another page. Apply visible in the website template where it controls a public listing. Follow an upload and crop