Why Does an Image Fail to Be Uploaded Through SWR Console?
SWR has strict requirements on image name and address format. Invalid image names or addresses could lead to upload failures.
- Problem: When you upload an image to SWR through the SWR console, an error message is displayed, indicating that the image format is invalid.
Possible cause: Invalid image address leads to upload failure.
Solution: Check and modify the image address according to the following sample and description. tag at the end of the address can be omitted, in which case it indicates that the image tag to be uploaded is the latest. Other parts of the image address are compulsory.
Example: swr.cn-north-1.myhuaweicloud.com/repo_namespace/repo_name:tag
- swr.cn-north-1.myhuaweicloud.com indicates the SWR image repository address.
- repo_namespace indicates the organization name. Its regular expression is ^([a-z]+(?:(?:(?:_|__|[-]*)[a-z0-9]+)+)?)$. Enter a maximum of 64 characters.
- repo_name:tag indicates the image name and tag. The image name regular expression is ^([a-z0-9]+(?:(?:(?:_|__|[-]*)[a-z0-9]+)+)?)$. Enter a maximum of 128 characters.
To view the image address, decompress the image. Open the manifest.json file, and check the value of RepoTags.

- Problem: When you upload an image to SWR through the SWR console, the upload progress is stuck and the upload task times out at the end.
Possible cause: Invalid image name leads to upload failures.
Solution: Modify the image name according to the naming rules, and try uploading the image again.
It is the image name in the repositories and manifest.json files that should be checked and modified rather than the name of the image file you select and upload on the SWR console.
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.