danmindru / responsive-html-email-signature

✨ Template generator for (responsive) emails & email signatures
https://responsive-html-email-signature-generator.com
MIT License
831 stars 246 forks source link

Fail with bad image urls #98

Closed danmindru closed 3 years ago

danmindru commented 3 years ago

Invalid urls should fail with a nice message

anujpunjani commented 3 years ago

Hi, as a beginner, I would like to work on this issue. Please correct me if I am wrong, as I understand, image URLs inserted in email content could be broken and we should check if it is failing to load the image first and if yes then we should replace it with the nice message?

danmindru commented 3 years ago

Hi @anujpunjani, thanks for taking the time - really appreciate it 🙂

Exactly, if the url format is incorrect, an error message should be displayed so people don’t waste time debugging

danmindru commented 3 years ago

A simple version would be to just check if the url has a correct format. A more advanced one would be to actually try to get that image (http GET) and see if the response is 200 and it is actually an image

anujpunjani commented 3 years ago

Thanks for the reply @danmindru, Could you please assign me to the issue? Or If I raise a PR for this issue that would do that automatically? Also, if you have any current screenshots of this failed scenario, could you please share it and the code reference to provide a jump start?

anujpunjani commented 3 years ago

Hi, I have created a possible solution in the above-linked PR, Could you please check it once and let me know if it would be better to make changes to the node module?

danmindru commented 3 years ago

Hi @anujpunjani, fantastic. Thanks for the contribution! I am not able to get to a computer until mid next week, but will take a look at the PR as soon as I get to one! Sorry for the delay.

danmindru commented 3 years ago

Fixed in #100 🎉