react-email-editor icon indicating copy to clipboard operation
react-email-editor copied to clipboard

Fallback Option to Image Tool

Open w1am opened this issue 1 year ago • 0 comments

I suggest adding a fallback option to the image tool so that, in cases where the image doesn't load, the fallback value that the user sets would display instead. Adding this feature would greatly improve the user experience and prevent issues with missing images.

A prototype for fallback without using javascript:

<div style="height: 200px;">
  <img style="width: 100%; height: 100%; object-fit: contain" src="{P{{product}}_IMG}" alt="Image not found"
    onerror="this.onerror=null;this.src='https://placehold.co/600x400/EEE/31343Chttps://placehold.co/600x400/EEE/31343C';">
</div>

w1am avatar Apr 27 '23 04:04 w1am