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 media 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:

https://cdn.accentuate.io/12345678/12345678/filename-v12345678.ext

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 your visitors' browser. Where possible, the uploaded media's original dimensions in "width x height" format are appended as a query string 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:

https://cdn.accentuate.io/12345678/12345678/filename-v12345678.ext?100x300

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 cdn.accentuate.io, 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 the performance of our media delivery has been optimized on a general level, you should still consider further optimizations.

Last updated