kartik-v / bootstrap-fileinput

An enhanced HTML 5 file input for Bootstrap 5.x/4.x./3.x with file preview, multiple selection, and more features.
http://plugins.krajee.com/file-input
Other
5.36k stars 2.4k forks source link

zoomData load image only on zoom #1720

Closed Gritmatch closed 3 years ago

Gritmatch commented 3 years ago

Prerequisites

Steps to reproduce the issue

'initialPreviewConfig' => [ [ 'zoomData' => $zoomUrl, // separate larger zoom data ]

zoomData loads zoom image right away when dropzone loads. The screenshot below shows 6 images loaded. 3 thumbnails and 3 large zoom images.

image

Expected behavior and actual behavior

I was expecting zoomData image to only load when user clicks on the zoom button. This would conserve resources. Perhaps I misunderstand the function of zoomData. Does it exist just to display different image in zoom than is displayed in preview and not necessarily to avoid loading large images, if not requested by the user?

Environment

Browsers

Operating System

Libraries

Isolating the problem

kartik-v commented 3 years ago

Yes zoom data is loaded on the client and stays hidden until user chooses to see zoomed view. Will check if a potential enhancement is possible to control this

kartik-v commented 3 years ago

Resolved via latest enhancement above - zoomData will be lazy loaded on demand (when a user chooses to zoom to the specific content).