kolkov / ngx-gallery

A simple responsive native gallery component for Angular 8+.
https://ngx-gallery.kolkov.ru/
MIT License
115 stars 56 forks source link

URL assumptions is 1.2.x cause images to not display correctly #31

Closed notdmart closed 4 years ago

notdmart commented 4 years ago

ngx-gallery v 1.2.0 was released a few days ago with more (or potentially new) support for videos, but some of the assumptions made around the source cause existing images to no longer display.

23 (particularly changes in ngx-gallery.service.ts) assumes that all source urls will end in .{fileExtension} in order to be classified as images or videos. There are a decent number of sources that do not necessarily list the file extension in the URL (placem.at, S3 signed urls), instead denoting the content in the content-type header.

Reproduction: https://stackblitz.com/edit/kolkov-ngx-gallery-qz12a9 The third image in the gallery uses a placem.at url, which functions correctly in <= 1.1, but no longer functions in 1.2

Let me know if you need more info! Great component overall!

Pritha-Roy commented 4 years ago

I'm also experiencing the same issue with S3 images. Is there any solution yet?

mattgek commented 4 years ago

experiencing the same issue

notdmart commented 4 years ago

28 captures the gist of this. Closing to reduce noise. Current fix is to cap the version at 1.1.x