Email images don't display when using custom port #945

Closed
opened 2026-02-04 23:25:10 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @JOHLC on GitHub (Feb 20, 2021).

Subject of the issue

Email images don't display when using custom port

Your environment

  • Bitwarden_rs version: 1.19.0
  • Install method: Docker

  • Clients used: Any

  • Reverse proxy and version: Nginx

  • Version of mysql/postgresql: Unknown
    image

  • Other relevant information:

Possible workarounds:
-- Use Base64 encoding so the image doesn't need to call a local resource
image
image
-- Allow user to specify port for static content like that
-- Serve the content from an online source instead of locally

Steps to reproduce

Set custom https port number
Setup SMTP email
Receive email from Bitwarden RS
Notice issue

Expected behavior

Images should display in the emails from Bitwarden
image

Actual behavior

Images broken in the email - in my case this is because I use a custom port and the email is hardcoded to default https port
Correct image url https://mydomain.com:5448/bwrs_static/logo-gray.png
Url used in the html email: https://mydomain.com/bwrs_static/logo-gray.png
image

Relevant logs

Originally created by @JOHLC on GitHub (Feb 20, 2021). <!-- # ### NOTE: Please update to the latest version of bitwarden_rs before reporting an issue! This saves you and us a lot of time and troubleshooting. See: https://github.com/dani-garcia/bitwarden_rs/issues/1180 # ### --> <!-- Please fill out the following template to make solving your problem easier and faster for us. This is only a guideline. If you think that parts are unnecessary for your issue, feel free to remove them. Remember to hide/obfuscate personal and confidential information, such as names, global IP/DNS addresses and especially passwords, if necessary. --> ### Subject of the issue Email images don't display when using custom port ### Your environment <!-- The version number, obtained from the logs or the admin diagnostics page --> <!-- Remember to check your issue on the latest version first! --> * Bitwarden_rs version: 1.19.0 <!-- How the server was installed: Docker image / package / built from source --> * Install method: Docker * Clients used: Any * Reverse proxy and version: Nginx * Version of mysql/postgresql: Unknown ![image](https://user-images.githubusercontent.com/63735432/108603578-c433db00-7376-11eb-8958-84c6980d2b4a.png) * Other relevant information: Possible workarounds: -- Use Base64 encoding so the image doesn't need to call a local resource ![image](https://user-images.githubusercontent.com/63735432/108603400-ad40b900-7375-11eb-896e-593c87939b02.png) ![image](https://user-images.githubusercontent.com/63735432/108603424-d19c9580-7375-11eb-946d-1963c052a9e8.png) -- Allow user to specify port for static content like that -- Serve the content from an online source instead of locally ### Steps to reproduce Set custom https port number Setup SMTP email Receive email from Bitwarden RS Notice issue <!-- Tell us how to reproduce this issue. What parameters did you set (differently from the defaults) and how did you start bitwarden_rs? --> ### Expected behavior Images should display in the emails from Bitwarden ![image](https://user-images.githubusercontent.com/63735432/108603614-f80f0080-7376-11eb-9fea-f46cc61c9af2.png) ### Actual behavior Images broken in the email - in my case this is because I use a custom port and the email is hardcoded to default https port Correct image url https://mydomain.com:5448/bwrs_static/logo-gray.png Url used in the html email: https://mydomain.com/bwrs_static/logo-gray.png ![image](https://user-images.githubusercontent.com/63735432/108603118-132c4100-7374-11eb-8003-d4598826965e.png) ### Relevant logs <!-- Share some logfiles, screenshots or output of relevant programs with us. -->
Author
Owner

@JOHLC commented on GitHub (Feb 20, 2021):

Neverminded I was able to resolve this by setting domain url with the port number in the admin panel
image

image

@JOHLC commented on GitHub (Feb 20, 2021): Neverminded I was able to resolve this by setting domain url with the port number in the admin panel ![image](https://user-images.githubusercontent.com/63735432/108603773-e712bf00-7377-11eb-88a0-4175c62370e5.png) ![image](https://user-images.githubusercontent.com/63735432/108603816-11fd1300-7378-11eb-9744-9c22971cfe92.png)
Author
Owner

@BlackDex commented on GitHub (Feb 20, 2021):

As the screenshot already tells you, your domain configuration is not correct. If you run bitwarden an other port, you also need to configure that as as DOMAIN, So include the :5684

@BlackDex commented on GitHub (Feb 20, 2021): As the screenshot already tells you, your domain configuration is not correct. If you run bitwarden an other port, you also need to configure that as as `DOMAIN`, So include the `:5684`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#945