Welcome to the LimeSurvey Community Forum

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

Add an image to the email template

More
7 years 4 months ago #167366 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.
More
7 years 4 months ago #167369 by Joffm
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
6 years 9 months ago #177717 by anaidgh
Hi,

Sorry how do you know the LimeSurvey_Installation_Name?
The topic has been locked.
More
6 years 9 months ago #177719 by tpartner
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.
More
6 years 9 months ago #177730 by DenisChenu
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 support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
More
6 years 8 months ago #178198 by rikatechdoku

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.
More
6 years 8 months ago #178202 by DenisChenu
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 support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
More
6 years 8 months ago #178204 by DenisChenu
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 support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
More
6 years 8 months ago - 6 years 8 months ago #178207 by rikatechdoku
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: 6 years 8 months ago by rikatechdoku.
The topic has been locked.
More
6 years 8 months ago #178209 by DenisChenu
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 support - Plugins, theme and development .
I don't answer to private message.
More
6 years 8 months ago - 6 years 8 months ago #178221 by rikatechdoku
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: 6 years 8 months ago by rikatechdoku.
The topic has been locked.
More
6 years 8 months ago #178224 by holch

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

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The topic has been locked.
More
6 years 8 months ago #178236 by DenisChenu
I'm on a instance inside subdiretory, then my HTML editor is broken (don't see file)
Code:
<img alt="" src="/upload/themes/survey/skelvanilla/files/poweredby.png" style="width:100px;height:auto"/>
Work like a charm : review your url

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
More
6 years 8 months ago #178239 by rikatechdoku

DenisChenu wrote: ...

Code:
<img alt="" src="/upload/themes/survey/skelvanilla/files/poweredby.png" style="width:100px;height:auto"/>
Work like a charm : review your url

ok, I will check again, THX for all the help!

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.
More
6 years 8 months ago #178240 by rikatechdoku

holch wrote: ... As far as I know, Limesurvey Pro hosts on Linux (just as so many others).

Ok, thx, will have to be careful with that from now on.

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.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose