Skip to content

Is it possible to provide custom error template #626

Open
@mmart1n

Description

@mmart1n

Hello, if a wrong url to image is provided the gallery displays div with class g-image-error-message. Is it possible to provide custom template for it?

Activity

MurhafSousli

MurhafSousli commented on Jan 7, 2025

@MurhafSousli
Owner

You can provide a custom template but this means you need to handle the display of the images as well

mmart1n

mmart1n commented on Jan 7, 2025

@mmart1n
Author

Currently in version 8.0.4 when autoHeight is set to true and max-height is set, when an image fails to load the original error template is rendered with height of 16px, no matter that the GalleryItemComponent has min-height of 300px for example.
This seems to do the trick, but in case you have any other suggestions I'm glad to hear.

ps. If all of the images can't be loaded the height of the .g-box is 0 and the fallback is not visible at all.
image

MurhafSousli

MurhafSousli commented on Jan 13, 2025

@MurhafSousli
Owner

It's kinda difficult for me to go back to an older version, I don't remember what was possible at that version and whether it was fixed in a newer version. it's a small project you know. I can only deal and investigate with the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

      Participants

      @MurhafSousli@mmart1n

      Issue actions

        Is it possible to provide custom error template · Issue #626 · MurhafSousli/ngx-gallery