Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing images in biosecurity alerts email template #208

Closed
kylie-m opened this issue Apr 30, 2024 · 5 comments
Closed

Missing images in biosecurity alerts email template #208

kylie-m opened this issue Apr 30, 2024 · 5 comments
Assignees
Labels
Biosecurity Alerts for biosecurity species
Milestone

Comments

@kylie-m
Copy link

kylie-m commented Apr 30, 2024

For the Biosecurity Alert emails, there are some cases where the occurrence record thumbnail image is missing.

  • Typically, this is when the image is still processing.
  • This is distinct from there being no image supplied at all, in which case we display a "no image available" placeholder

Screenshot of issue below:
Screenshot 2024-04-30 at 10 32 52 am

To avoid the broken image, can we instead display the "no image available" placeholder in this scenario?

@kylie-m kylie-m added the Biosecurity Alerts for biosecurity species label Apr 30, 2024
@kylie-m kylie-m added this to the 4.2.0 milestone Apr 30, 2024
@qifeng-bai
Copy link
Contributor

qifeng-bai commented May 2, 2024

There is no way of CSS/HTML to know if the image is broken link. It relies on JS to process when 'onerror' is triggered.

Methods which have been tested and failed:
1, JS is forbidden by emails service.
2, Using element 'object' element works will on browsers , but Gmail and outlook does not support
3, Using CSS img:before fails on Gmail

 .species-thumbnail-img:before {
    content: url("${grailsApplication.config.grails.serverURL + '/assets/email/no-img-transparent.png'}");
  }

@qifeng-bai
Copy link
Contributor

qifeng-bai commented May 2, 2024

After using a default image or previous loaded image for missing thumbnail, Gmail prevents showing the pics, and some CSS controls are broken as well

The html content we sent has been modified by GMail. For example: CSS classes and URL have been modified by Gmail

When we use
.species-thumbnail-img:before { content: url("${grailsApplication.config.grails.serverURL + '/assets/email/no-img-transparent.png'}"); }

Chrom displayed:
Screenshot 2024-05-03 at 3 23 25 pm

Outlook displayed:

Screenshot 2024-05-03 at 3 23 12 pm

Gmail displayed:

Screenshot 2024-05-03 at 3 23 18 pm

Update

Now, both are not working

@adam-collins
Copy link
Contributor

Underline species name so it is clear it is a link.

Swap Image and Map images so the map is displayed first.

Left align content so it does not centre.

@qifeng-bai
Copy link
Contributor

Screenshot 2024-05-20 at 2 11 41 pm

@kylie-m
Copy link
Author

kylie-m commented May 21, 2024

the new changes are looking good in Outlook, gmail and yahoo mail on desktop

qifeng-bai added a commit that referenced this issue May 22, 2024
@nickdos nickdos closed this as completed Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Biosecurity Alerts for biosecurity species
Projects
None yet
Development

No branches or pull requests

4 participants