Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Add an image to the email template

  • APDResearch1
  • APDResearch1's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 11 months ago #167366 by APDResearch1
Add an image to the email template was created by APDResearch1
Hiya
I would like to add an image to the email invitation template but the image is stored locally on my computer and not online. Its the same image as I have successfully uploaded to be the logo.

I am using the latest version 3.6.2 on the LimeSurvey server.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 11 months ago #167369 by Joffm
Replied by Joffm on topic Add an image to the email template
Hi,
so it is not only on your local computer, where it is more or less useless, but in your template folder.

Just enter in your e-mail:
<img src="http(s)://www.myServer.com/[LimeSurvey_Installation_Name]/upload/themes/survey/[myTheme]/files/[filename]" />

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: APDResearch1
The topic has been locked.
More
5 years 3 months ago #177717 by anaidgh
Replied by anaidgh on topic Add an image to the email template
Hi,

Sorry how do you know the LimeSurvey_Installation_Name?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 3 months ago #177719 by tpartner
Replied by tpartner on topic Add an image to the email template
Look at the address bar in your browser.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 3 months ago #177730 by DenisChenu
Replied by DenisChenu on topic Add an image to the email template
And if you add image like this:
<img src="/[LimeSurvey_Installation_Name]/upload/themes/survey/[myTheme]/files/[filename]" />

It's directly included in email : image is attached.

I think if you use browser server for attach image : it does the job.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
More
5 years 3 months ago #178198 by rikatechdoku
Replied by rikatechdoku on topic Add an image to the email template

DenisChenu wrote: And if you add image like this:
<img src="/[LimeSurvey_Installation_Name]/upload/themes/survey/[myTheme]/files/[filename]" />

It's directly included in email : image is attached.

I think if you use browser server for attach image : it does the job.


Am I doing something wrong?

When I simply insert a pic with the tool from the toolbar icon in the email-template editor, it references the whole address now (incl. http) and the invitation email is also sent like that. (2 days ago it referenced a relative path. Don't know what I did different.)

If I manually reference a pic with a relative path like <img src="/[LimeSurvey_Installation_Name]/upload/themes/survey/[myTheme]/files/[filename]" />, then the pic does not show up in the email. Even the email-template editor shows the broken/not found image icon.

If I manually reference a pic with a relative path like <img src="/upload/themes/survey/[myTheme]/files/[filename]" /> (without "/[LimeSurvey_Installation_Name]", then the pic does at least show up in the email-template editor but it is still not displayed in the email (on GMail). I can also not see any attachment.

I'm using the hosted LimeSurvey Pro version (at least 3.15) on LS servers, AND also the locally installed xampp version as well (at least 3.15).
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 3 months ago #178202 by DenisChenu
Replied by DenisChenu on topic Add an image to the email template
Let me check : it work in 2.73, unsure in last version … (and then : it's a bug)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 3 months ago #178204 by DenisChenu
Replied by DenisChenu on topic Add an image to the email template
Tested , if in subdirectory : remove the base url + subdirectory.

Work if image is in survey ressources, but need to remove /[LimeSurvey_Installation_Name]

Tested : bugs.limesurvey.org/view.php?id=14343

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
More
5 years 3 months ago - 5 years 3 months ago #178207 by rikatechdoku
Replied by rikatechdoku on topic Add an image to the email template
Are you sure that the images also get sent with the email, if inserted like
<img src="/upload/themes/survey/[myTheme]/files/[filename]" />
or like
<img src="/upload/themes/survey/[myTheme]/images/[filename]" />
because for me the images are displayed in the email template editor like that but I can't see them in GMail (nor in Outlook, however with Outlook I don't know if this has others reasons)?

I'm using the hosted LimeSurvey Pro version (at least 3.15) on LS servers, AND also the locally installed xampp version as well (at least 3.15).
Last edit: 5 years 3 months ago by rikatechdoku.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 3 months ago #178209 by DenisChenu
Replied by DenisChenu on topic Add an image to the email template
Yes, even with gmail



Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
More
5 years 3 months ago - 5 years 3 months ago #178221 by rikatechdoku
Replied by rikatechdoku on topic Add an image to the email template
First of all, thx for all your replies, Denis!

1) I must admit that so far I had worked with
src="/upload/surveys/SURVEYID/images/FILENAME"
and
src="/upload/surveys/SURVEYID/files/FILENAME"
all the time. Saw that now. But it does not matter much as can be seen under point 2.

To my excuse I may say, that these patterns above are at least consistent with what you wrote in your bug report .

2) I now purposely tried your path
src="/themes/admin/Sea_Green/images/logo_icon.png".
This one works -> The image shows in template editor AND also successfully ends up in the email als CID, yay!

However, I now also conciously tried
src="/upload/themes/survey/THEME-NAME/files/FILENAME" [-> template editor ok, but not in email],
src="/themes/survey/THEME-NAME/files/FILENAME" [-> neither in template editor nor in email],
src="/upload/themes/survey/THEME-NAME/images/FILENAME" [-> template editor ok, but not in email],
src="/themes/survey/THEME-NAME/images/FILENAME" [-> neither in template editor nor in email],
and even
src="/surveys/SURVEYID/images/FILENAME" [-> neither in template editor nor in email].

So, in the end result, I still could not figure out how to embed a custom uploaded image into the email as CID.
I understand if you have better things to do. Still, if you have any more ideas, they would be appreciated. thx.

BTW, while testing I found out that the paths strings are case sensitive. Didn't expect that. Important to know, though.

I'm using the hosted LimeSurvey Pro version (at least 3.15) on LS servers, AND also the locally installed xampp version as well (at least 3.15).
Last edit: 5 years 3 months ago by rikatechdoku.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 3 months ago #178224 by holch
Replied by holch on topic Add an image to the email template

BTW, while testing I found out that the paths strings are case sensitive. Didn't expect that. Important to know, though.

As far as I know, this is normal Linux behavior. File paths are case sensitive in Linux, different to Windows. As far as I know, Limesurvey Pro hosts on Linux (just as so many others).

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose