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

Ability to load images in signatures #2733

Closed
JohnMaree opened this issue Mar 7, 2020 · 39 comments · Fixed by #6935
Closed

Ability to load images in signatures #2733

JohnMaree opened this issue Mar 7, 2020 · 39 comments · Fixed by #6935
Milestone

Comments

@JohnMaree
Copy link

JohnMaree commented Mar 7, 2020

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.

@ChristophWurst
Copy link
Member

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.

@ChristophWurst
Copy link
Member

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? 🤔

@JohnMaree
Copy link
Author

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?

@ChristophWurst
Copy link
Member

So one could always specify a size limit?

Absolutely!

@hanserasmus
Copy link

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?

@ChristophWurst
Copy link
Member

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.

@hanserasmus
Copy link

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?

@CATER-COM
Copy link

@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
Copy link
Member

@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.

@CATER-COM
Copy link

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 :)

@hugovalters
Copy link

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.

@ChristophWurst
Copy link
Member

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.

@ChristophWurst
Copy link
Member

I think you have to proxy the image through the server, so that there is no external domain for the image. And then when the message is sent you have to rewrite the HTML to change the href from pointing to the proxy to the target URL.

This and only this.

Please, give this a try. Or do it the way you think works and see that it doesn't.

If you have any development questions use https://help.nextcloud.com/c/dev/app-dev/24. This is an issue tracker.

@dumblob
Copy link

dumblob commented Oct 14, 2021

@marcotrevisan, but I still don't understand how the "correct" way should be? In other words how the others are doing it? For example when I send email from my Gmail (even from my desktop client), the images are shown correctly.

What do they do to get it working out of the box? Do you have any idea about it?

That's actually really easy (to say) - namely they bundle every single referenced thing (especially pictures) with the email as separate multipart/mixed content (this was shown and discussed somewhere in this thread and/or the linked resources from/to this thread). Second, MUAs are highly constrained when it comes to CSS (and of course html itself, but that's easy to overcome with generic tags and styles). Basically the rule is to inline all styles (as global styles won't work) and test it on non-recent iPhone (that's probably the most constrained of all MUAs) and in the GMail web email interface (which is IMHO the second most constrained one).

But it's not easy to implement & test in terms of manhours needed if you think of it...

@MohammedNoureldin
Copy link

MohammedNoureldin commented Oct 14, 2021

@ChristophWurst sorry but I still don't get the second part of your explanation. However, the general idea is clear to me now. And as it is not really pleasant to have development discussions here let us not continue in it.

I just want to add this link as it mentions the basic approaches to send images in emails (basically as explained above, but a bit more organized and colored), maybe this can help somebody.
https://www.mail-signatures.com/articles/images-in-email-signatures-linked-or-embedded/?sts=5255

@marcotrevisan

This comment was marked as resolved.

@ChristophWurst

This comment was marked as resolved.

@stevearbour

This comment was marked as off-topic.

@foxhoundv
Copy link

Hello, so I think this is a really good idea to have and as I scanned through the previous comments I thought of a couple ways that maybe this could be implemented. I am not a programmer so just giving some ideas...

  1. Reference a shared image on the Nextcloud instance that doesn't need special access. I'm guessing that <img src> would be the way to accomplish this and I did read that it isn't easy, just throwing out an idea.
  2. Setting --> Mail page that allows uploading of an image source or file?

If I missed any of these in the discussion I'm sorry, I tried to find if there were any similar postings.

@ChristophWurst ChristophWurst moved this from 📄 To do (5-20 entries) to 🏗️ In progress in 💌 📅 👥 Groupware team Jun 15, 2022
@ChristophWurst ChristophWurst added this to the v2.0.0 milestone Sep 2, 2022
Repository owner moved this from 🏗️ In progress to ☑️ Done in 💌 📅 👥 Groupware team Sep 2, 2022
@hugovalters
Copy link

Hello, is there any movement on this?

Thanks

@renatolinux
Copy link

NextCloud devs should pay attention to this request. I’ve already accessed all the topics, including this one, also without solution. I believe that such a feature should be implemented on the platform, as it is a basic feature that many people need, especially when it comes to the use of internal compliance by companies.

@kesselb
Copy link
Contributor

kesselb commented May 18, 2023

Welcome on GitHub @renatolinux 👋

Please take some time to familiarize yourself with GitHub.
Your favorite search engine may help you find matching articles.

image

An issue is open or closed. Closed + Fixed by means, in most cases, that a feature was implemented. Fixed by is the reference for the pull request that implemented the feature. It's possible to add images in signatures since Mail 2.0.

NextCloud devs should pay attention to this request.

"should pay attention" sounds very demanding. Please use it carefully, especially on GitHub.

@sturlan
Copy link

sturlan commented Oct 15, 2024

I see this is an old and complicated topic, some issues/request were fixed/implemented but i also i see that html signature does not work.
@ChristophWurst mentioned CSP issues, and also base64 problems, also a possible proxy solution, but i didn't catch why that went as a failure.
Clearly interested in a solution, i was thinking could it be possible to rewrite message after sending and decode images to base64 (since nextcloud does not like base64).
Sorry if i got something wrong or missed a topic, i am not a programmer just throwing out an idea.

@kesselb kesselb removed their assignment Oct 16, 2024
@kesselb
Copy link
Contributor

kesselb commented Oct 16, 2024

@sturlan please read #2733 (comment)

For help with the mail app: https://help.nextcloud.com/c/support/7 (category support, tag: mail-app)

If you are sure it's a bug, then please log a new issue here.

@nextcloud nextcloud locked and limited conversation to collaborators Oct 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects