All Products
Search
Document Center

Object Storage Service:Why am I unable to use an IMG URL to obtain the image from CDN when the domain name of the bucket in which the image is located is accelerated by CDN?

Last Updated:Sep 19, 2024

Problem description

I failed to use the Image Processing (IMG) URL of an image to obtain the image from CDN when the domain name of the bucket in which the image is located is accelerated by CDN.

Causes

This problem occurs due to the following reasons:

  • Parameter filtering is disabled for the domain name in the CDN console. When you use the IMG URL to access the image, CDN does not filter parameters and cannot find the image in the cache. In this case, CDN retrieves the image from the origin.

  • No CDN cache settings are configured. CDN uses the default cache rules, and the requested image has expired in the cache.

Solutions

To fix the problem, perform the following steps:

  1. Log on to the Alibaba Cloud CDN console.

  2. In the left-side navigation pane, choose Content Delivery > Domain Names.

  3. On the Domain Names page, find the domain name and click Manage.

  4. In the left-side navigation tree for the domain name, click Optimization and click Modify behind Ignore Parameters to configure parameter filtering.

  5. In the left-side navigation tree, click Cache . On the page that appears, specify a cache expiration time.

Applicable scope

  • CDN

  • OSS