To resize an existing image, you use the Store API, which provides access to the storefront. Issue a GET request to the /ccstore/v1/images
endpoint. The following table describes the query parameters you specify in the request.
Property | Description |
---|---|
| (Required) String that specifies the fully qualified URL for the image to resize. This is returned in the response to |
| (Required) The maximum height for the resized image, in pixels. If the request does not include either |
| (Required) The maximum width for the resized image, in pixels. If the request does not include either |
| Number that lets you control the image resolution quality. The value of For example, you might want to reduce the resolution of product listing images to speed up image loading times. The default value of, |
For example, the following request resizes a product image to 500x500:
GET /ccstoreui/v1/images/?source=/file/v7875483805069966233/products /APP_WeekendTrouser_full.jpg&height=500&width=500
Oracle Commerce Cloud images arecached by default in the Content Delivery Network (CDN). In this example, v7875483805069966233 is a timestamp that is automatically generated in URLs for product images. If you use the /images endpoing for other images, and you expect that you will update or resize images, it is important to include cache busting in the URL so that client browsers get the updated image and not a cached version.