fancyapps / ui

A library of JavaScript UI components, includes the best lightbox - Fancybox5
https://fancyapps.com/
Other
786 stars 98 forks source link

how to change default load error image #694

Closed zenonux closed 1 week ago

zenonux commented 1 week ago

Is your feature request related to a problem? Please describe.

can not change default load error image

Describe the solution you'd like

<div class="f-carousel" :data-load-error-src=""></div>

Describe alternatives you've considered

No response

Additional context

No response

fancyapps commented 1 week ago

Hi,

Check the documentation for the localization - https://fancyapps.com/fancybox/getting-started/#localization

Fancybox.bind('[data-fancybox="gallery"]', {
  l10n: {
    IMAGE_ERROR : "☹️"
  }
});    

https://jsfiddle.net/cfdseq29/

zenonux commented 1 week ago

Hi,

Check the documentation for the localization - https://fancyapps.com/fancybox/getting-started/#localization

Fancybox.bind('[data-fancybox="gallery"]', {
  l10n: {
    IMAGE_ERROR : "☹️"
  }
});    

https://jsfiddle.net/cfdseq29/

It seems like there is no way to change the default image for failed image loading in the carousel and thumbnail components.

fancyapps commented 1 week ago

Sorry, but I just do not understand what do you mean by "default image", or what and why do you expect to happen when image could not be loaded.

zenonux commented 6 days ago

Sorry, but I just do not understand what do you mean by "default image", or what and why do you expect to happen when image could not be loaded.

image the image looks ugly when it fails to load properly.I want to load the image https://test.com/default-error.png when the original image fails to load.

fancyapps commented 5 days ago

Oh, I see now, I will think about it for the next version, thanks.