The HTTP 404 Not Found Error is a Hypertext Transfer Protocol (HTTP) standard response code, in computer network communications, to indicate that the browser was able to communicate with a given server, but the server could not find what was requested. In the Cloudinary fetch context, it means that the server couldn't find the image and this can be explained by different reasons:
- The image is actually missing in the remote server. To check if it is the case, you'll need to load in your browser the URL you are trying to fetch e.g if the URL you are using is https://res.cloudinary.com/demo/image/fetch/https://upload.wikimedia.org/wikipedia/commons/1/13/Benedict_Cumberbatch_2012.png, you can load https://upload.wikimedia.org/wikipedia/commons/1/13/Benedict_Cumberbatch_2012.png and see if you get an error or not. In this case, the image is still not found hence it doesn't exist. If the image exists, please refer to the other reasons.
- The fetch type is restricted on new accounts by default hence it will return a 404. There are two options you can use to resolve this:
- Go into the security settings of the management console and remove the checkbox that restricts the fetch type, then save the settings
- Use our SDK to create a signature for the URL or use the API to request that image is fetched, either of which indicates that the request came from your code and will allow the fetch to proceed.
- The Allowed fetch domains field in your security settings is not empty and the request is not coming from one of the domains in the list. In this case, you will have to either remove this whitelist or add the domain to the list.
- The URL you are fetching is using more than 5 redirects to deliver the image. This is a fixed limit set on Cloudinary side and having more redirects than this limit will lead to a 404. In this case, you will need to reduce the number of redirections on your side.
Comments
0 comments
Please sign in to leave a comment.