Skip to content

Conversation

josecelano
Copy link
Member

The error is an image with a text explaining the error. The reason is I don't want the sanitizer to inject other elements into the DOM. The sanitizer replaces images img with proxied images (images from the proxy the Index API).

The current behavior when the proxy does not work or the extension is not valid is just not showing the image. This PR generates an error image in those cases. The same way browsers show "broken images" when they can load images.

It'll be used to show errors when a proxied image can't be loaded for
some reason:

- Proxy not available or with wonrg configuration.
- Image extension not allowed.
cant' be loaded becuse:

- The image proxy returns an error.
- The image extension is not allowed.
@josecelano josecelano self-assigned this Feb 20, 2024
@josecelano josecelano added UX User Experience - User - Enjoyable to Use our Software labels Feb 20, 2024
@josecelano josecelano linked an issue Feb 20, 2024 that may be closed by this pull request
@josecelano josecelano requested a review from mario-nt February 20, 2024 16:26
@josecelano
Copy link
Member Author

ACK e578718

@josecelano josecelano added this to the v3.0.0 milestone Feb 20, 2024
@josecelano josecelano merged commit f91d257 into torrust:develop Feb 20, 2024
@josecelano josecelano deleted the 409-show-error-when-proxied-image-cannot-be-loaded branch February 20, 2024 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

- User - Enjoyable to Use our Software UX User Experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show error when proxied image cannot be loaded

1 participant