Skip to content

Images uploaded in newsletter content are missing #10465

@Quentinchampenois

Description

@Quentinchampenois

Describe the bug
A clear and concise description of what the bug is.

As an administrator, when I create my newsletter and upload images with the WYSWYG editor, I can see my uploaded image in the preview.

However, once my newsletter is sent, users cannot see this image.

To Reproduce
Steps to reproduce the behavior:

  1. Go to BO
  2. Click on newsletter
  3. Create a newsletter
  4. Upload image in body
  5. Check preview => you should see the image
  6. Send the newsletter
  7. Go to letter-opener /letter_opener
  8. See image present in body

⚠️ In development mode, image always will be displayed because src attribute contains a relative path and can be resolved locally

Expected behavior
A clear and concise description of what you expected to happen.

I expect my image to have a src attribute containing the absolute path of my images : https://my.decidim/<relative_path> to be visible directly in my newsletter content

Extra data (please complete the following information):

Additional context
Add any other context about the problem here. For instance, add Metadecidim link.

Image file uploader works well for usage inside the application. However image are unreachable from external resources (newsletter and maybe others ?)

Suggestion

Fix editor_images_controller to return the full path.

Or we can find a way to return the full path when resource is accessible from outside and keep the initial behaviour which is to return relative path of uploaded image

Screenshot
Screenshot 2023-03-02 at 11 17 00

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions