Media v1 (legacy)

When defining fields of the 'Media (legacy)' type, you are able to upload files of different media types. Each field is defined together with a set of allowed file extensions, so you can control the type of file uploaded via the editor. Uploaded medias are automatically uploaded to a secure Google Cloud Platform bucket and the corresponding URL pointing to the file is stored in the metafield, ready to use:

<img src="{{ product.metafields.accentuate.extra_image }}"/>

The URL in the metafield will have the form

where '12345678/12345678' is a set of internal Shopify ids designating which Shopify resources it belongs to and 'v12345678' is a random version number assigned by ACF to the uploaded filename to keep it unique and ensure any new files will reach to your visitors' browser. Where possible, the uploaded media's original dimensions in "width x height" format are appended as a querystring to the url stored in the metafield. If you need to extract the dimensions in Liquid for layout purposes, you can split the url by the '?' sign and the 'x' separating the dimensions. Example url:

ACF currently has a limit of ~50MB per media upload. You will typically only reach this limit when uploading video files. Take care not to force your visitors to download assets of this size but consider using a streaming service for large video files (like YouTube)

Media uploads are served directly via world-class software services with very low network latency. ACF also employs performance optimization techniques similar to Shopify when fetching images via, including transforming images to WEBP format for supporting browsers (WEBP is only served if the resulting image is in fact smaller than the original image after optimisation)

While performance of our media delivery has been optimized on a general level, you should still consider further optimizations.

Last updated