The SDK Media API contains functionality for working with Wix Media resources.
Note: This API isn't necessary when developing Wix sites or when coding in Blocks.
The SDK Media API enables you to get absolute URLs for Wix Media resources, including scaled and cropped images.
With the SDK Media API, you can:
Wix APIs identify Wix Media resources using internal identifiers with the following structure:
For example, a product or cart item object may refer to its associated image with an identifier such as "wix:image://v1/3c76e2_c5331f937348492a97df87b...".
You can use the SDK Media API to obtain an absolute URL for such an image, so you can access and manipulate it in your own code. You can obtain a URL for the original image, or for a scaled or cropped version of the image.
This example shows how to use getImageUrl() to obtain an absolute URL from the Wix Media identifier for an image provided by the getCurrentCart() method.