haltakov / simple-photo-gallery

Beautiful and simple photo galleries that help you tell your story. Free and open-source.
https://haltakov.net/simple-photo-gallery
MIT License
194 stars 51 forks source link

Add support for .png files #80

Closed Zenahr closed 4 years ago

Zenahr commented 4 years ago

png images are not recognized, thus the gallery is not built. Either implicit conversion should be applied (since jpegs are generally smaller than pngs) or they should just be added the same way jpegs are added to the gallery.

haltakov commented 4 years ago

I implemented support for PNG files. I think implicit conversion to JPG is not the correct way, because it will be converting from a lossless to a lossy compression.

I can see some use-cases for this, like for example having a gallery with app/website screenshots. This features makes sense, so thanks for reporting.

Zenahr commented 4 years ago

At least this saves the user from explicitly converting all their images to jpg instead of just uploading them.

For image compression at build-time Gatsby is a pretty great inspiration: https://www.gatsbyjs.org/packages/gatsby-image

haltakov commented 4 years ago

I agree this makes sense as an option. I created an issue for that: https://github.com/haltakov/simple-photo-gallery/issues/83