0

Is there a way to apply a custom style to an image that it's not downloaded?

I mean, I have a large image with auto height and I would like to change the size (to a small size) if is not possible to download it.

Is it possible?

Safari
  • 11,437
  • 24
  • 91
  • 191
  • Does this answer your question? [How to silently hide "Image not found" icon when src source image is not found](https://stackoverflow.com/questions/3235913/how-to-silently-hide-image-not-found-icon-when-src-source-image-is-not-found) – Heretic Monkey May 26 '21 at 15:32
  • The answers to the above question show how to alter the style of the element if the image fails to download. It does use JavaScript to accomplish the feat, but as far as I know, there is no CSS-only method to detect whether the image successfully loaded or not. – Heretic Monkey May 26 '21 at 15:39

0 Answers0