Image Not Accepted Please Try Again

How to handle loading of images that may not exist?

A sample page with broken images every bit seen on Google Chrome browser

1. Periodic information cleanup

2. Handle it in your application

          <img src="http://example.com/non-existent-image.jpg" onerror="this.onerror=null;this.src='http://example.com/existent-image.jpg';" />        

three. Handle it on your image server

4. Handle it using a third-party image server like ImageKit.io

          <!-- The not-existent prototype URL -->
<img src="https://ik.imagekit.io/demo/img/non_existent_image.jpg" />
<!-- Specifying the default image to be displayed in the URL -->
<img src="https://ik.imagekit.io/demo/img/tr:di-medium_cafe_B1iTdD0C.jpg/non_existent_image.jpg" />

Deliver a default paradigm, the one on the right, instead of the broken epitome, the i on the left.

Considerations for image caching in error cases

Considerations for response code in error cases

billiotlize1951.blogspot.com

Source: https://blog.imagekit.io/how-to-handle-loading-images-that-may-not-exist-on-your-website-92e6c3c6ea63

0 Response to "Image Not Accepted Please Try Again"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel