Replies: 2 comments 6 replies
-
The Line 155 in 248e561 However, if you set Lines 607 to 616 in 248e561 Lines 1046 to 1051 in 248e561 /vw_static/logo-gray.png (via your reverse proxy) without changing the template.
|
Beta Was this translation helpful? Give feedback.
-
So many answers - but the easiest way to do this is to actually embed the image in the email template. As to make this semi-universal, I will convert using the base64 command that can be found in the container. Creating Embedded ImagesFirst, create a 'branding' (or any other name you wish) directory in the docker volume for /data/. In this directory, upload the logos or other images you want to be used. Now, connect to your Vaultwarden docker container shell by issuing the docker command If done correctly, you should now see: Now for simplicity change directories to that folder in the attached console: Your console should look like this: Now to convert the images to base64, the output is the actual data stream used to embed images in html, or in the email templates for this use case For this example, I will use the favicon.ico file which is an x-icon mime type: Below is a portion of the output from my example command above, remember to copy the entire output: Copy this information from the console and place it using the instructions below. If you don't want so many lines in your code, remove the carriage returns after each line in your output or don't - either way it will work. VERY IMPORTANT You will note that I specifically informed you that I was using x-icon mime type. If you are converting a png, jpg, gif, etc, you must correctly identify the mime type in the
Here is my example with the above data in the For those that work better with images - real-world code:After reloading Vaultwarden the footer image in the email_footer.html.hbs looks like this: So how does this work?The Hope this helps! You can actually use this almost everywhere html is rendered. EDIT: Oops, I forgot to mention, make sure you follow the instructions for using custom email templates found https://github.com/dani-garcia/vaultwarden/wiki/Translating-the-email-templates#how-to-translate--customize-the-templates |
Beta Was this translation helpful? Give feedback.
-
Hello Community,
I'm trying to replace the logo_gray.png image in the E-Mail Header.
I'm using templates and I know that I have to change it in the email_header.hbs file.
My image is in the folder /images/ directly in the Vaultwarden Data Directory.
But it's not working, do you have any idea?
Here my config in email_header.hbs:
<img src="cid:logo" alt="Vaultwarden" width="190" height="50"
Name of the image is logo.png. I tried with ending .png, too.
My Docker Compose Config:
I hope anybody here can help me. I am searching so long time and now I have headache :-(
Kind regards,
David
Beta Was this translation helpful? Give feedback.
All reactions