Mail: Ability to load images in signatures

Created on 7 Mar 2020  路  14Comments  路  Source: nextcloud/mail

Feature Request

The ability for signatures for each account to have images is a common feature in most email clients.

Summary

The ability for signatures for each account to have images is a common feature in most email clients.
As an example:
compact-logo-1


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

1. to develop enhancement feature parity help wanted medium

Most helpful comment

Probably a dumb comment, but while exploring the Nextcloud filesystem, I see that the data folder contains sub-folders, some of them are dedicated to apps, for instance ownbackup, rainloop-storage, why not mail for signature images ?
The Deck app can also upload a file to a card that resides under data-[instanceId]/deck/file-car-[id]/

All 14 comments

As briefly discussed in the dev channel, we need a permanent storage for these images. And then transform them into attachments when the messages is sent.

As a step in between we could start with external images only. This isn't ideal. But for some cases like corporate logos, this might actually just do the job.

Another thing that we could do is use ckeditor's base64 "storage". Of course this bloats messages, but for small images (like, again, logos) this could be fine. Maybe worth a consideration? :thinking:

Another thing that we _could_ do is use ckeditor's base64 "storage". Of course this bloats messages, but for small images (like, again, logos) this could be fine. Maybe worth a consideration? 馃

Good idea! What makes this more appealing is the fact that typically people stray away form large signatures as loading them becomes a pain if they are too large. So one could always specify a size limit?

So one could always specify a size limit?

Absolutely!

Would it make sense to have an interim solution where the image is hosted on a third-party site like imgur.com, and have the URL pasted in the signature so that it shows up and "looks like" the image is added to the signature itself? Something similar to what google is allowing in it's gmail settings? Just until you have figured out the way forward into making it a clean integration to core code?

We could allow external images already, I think.

It's basically what I meant to explain with

As a step in between we could start with external images only. This isn't ideal. But for some cases like corporate logos, this might actually just do the job.

The app wouldn't need to care where the images are stored. We'd just need to find a way to not make the browser block these images with our strict CSP.

If you could allow them already, it would go a long way for users! I understood what you meant, just wanted clarification. Because we could create an image with all the details normally found in the signature, like the example @JohnMaree posted in the OP, and just link that in there.

I tried adding images a while back (like 3 weeks or so) and it was not working, but might be that one needs a specific syntax for the mail client/editor to understand this imported image?

@ChristophWurst sorry but you closed the issue, but there is no solution provided. You said it's already possible to insert third-party image but you didn't explain the way to do it. There is no visible way in the UI.

The exchange below sound quite strange. Why we should use third-party site to embed pictures in an app designed to work in context of storing and sharing content software ???

Why we can join picture as attachment but not inside the body ? Nextcloud Sharing Path App already deliver a way for Nextcloud to act as CDN. This process may apply to a specific folder dedicated to mail content.

@ChristophWurst sorry but you closed the issue, but there is no solution provided. You said it's already possible to insert third-party image but you didn't explain the way to do it. There is no visible way in the UI.

I never claimed that. Read my comment again. It just states that your feature request is a duplicate and we have an existing ticket for discussion.

The exchange below sound quite strange. Why we should use third-party site to embed pictures in an app designed to work in context of storing and sharing content software ???

Please carefully read the previous discussion. We want to have this, but it's not easy. So we would start small and add more advanced options gradually. But please change my mind and submit a pull request with the implementation.

We could allow external images already, I think.

@ChristophWurst sorry but I made tow mistake
1 - I understood the sentence below as it's something already possible. I may was too much enthousiast ;)
2 - I thought you closed this issue not only the one i opened as duplicate :-(
Hope you will find a way. have a nice day :)

Hello, but actually for Nextcloud you can use the cloud as temp storage, or the user can upload the Image into his cloud and use the public link. <--- This is Just as an idea.

As a step in between we could start with external images only. This isn't ideal. But for some cases like corporate logos, this might actually just do the job.

I'm looking into this right now. Adding the CKEditor plugin is easy. BUT you won't see the image when you compose the email as Nextcloud's strict CSP will block the image URL on the Nextcloud page.

I think we'll start with the base64 insert option and the external hosting will follow later.

Another thing that we _could_ do is use ckeditor's base64 "storage". Of course this bloats messages, but for small images (like, again, logos) this could be fine. Maybe worth a consideration?

So I did that

I think we'll start with the base64 insert option and the external hosting will follow later.

But turns out this is creating more problems than it solves. It's fairly simple to add base64 images to CKEditor, but our own client can't view those messages. Turns out we're not doing it wrong, but security practice typically forbids data sources for images in email.

Some references

So I'm concluding that this really isn't worth the effort. Let's rather have proper support for inline images that are sent as attachment. We can hopefully re-use some of our existing logic for this. Then a custom ckeditor uploader can wire the editor with our attachments: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/deep-dive/upload-adapter.html

Images as attachments doesn't solve the problem with signatures. For signatures we'll still need that special storage. This will be the most complex aspect of the whole feature.

Probably a dumb comment, but while exploring the Nextcloud filesystem, I see that the data folder contains sub-folders, some of them are dedicated to apps, for instance ownbackup, rainloop-storage, why not mail for signature images ?
The Deck app can also upload a file to a card that resides under data-[instanceId]/deck/file-car-[id]/

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jancborchardt picture jancborchardt  路  5Comments

HLFH picture HLFH  路  3Comments

sscherfke picture sscherfke  路  5Comments

clem-bcc picture clem-bcc  路  4Comments

fsedarkalex picture fsedarkalex  路  5Comments