To avoid image piracy risks, the exposure to image URLs must be restricted so that only thumbnailed or watermarked images can be obtained. To do this, you can enable source image protection.
After enabling the source image protection, you cannot access images in the following two ways:
- Access directly with an OSS address:
- Request thumbnails with processing parameters:
You can only access images in style mode:
- Access through URL parameters
- Access through separators
You can configure the access rules in the Image Processing module of the bucket in the console. Access rules
Configure access rules
- In the left-side bucket list of the OSS console, click the bucket for which you want to set the source image protection.
- Click the Image Processing tab to locate the Access Settings button. See the following figure:
- Click Access Settings to open the Access Settings dialog box, as shown in the following figure:
In the Settings dialog box, perform the following settings:
- Enable source image protection: After enabling the source image protection, you can only access the image file by passing in the stylename or using a signature-based method. Direct accesses to the OSS source file or accesses by passing in image parameters and modifying the image style are not allowed.
- Set the suffixes of the image files for source image protection.
- Customize separators.
- Once you set the needed options, click OK to finish setting the source image protection.