unjs / ipx

🖼️ High performance, secure and easy-to-use image optimizer.
MIT License
1.54k stars 61 forks source link

Handle partial encoding situation by firebase storage image URLs #49

Closed gabrielsze closed 2 years ago

gabrielsze commented 2 years ago

Hi team, thanks for the great library thus far - this is one of my first few times contributing and submitting a PR, so do bear with me and let me know how I can improve :)

This is related to https://github.com/nuxt/image/issues/435, where ipx is not handling firebase storage image weird URL structure, for example

https://firebasestorage.googleapis.com/v0/b/amber-prod.appspot.com/o/images%2Fwatch-dogs-2-sitara-dhawan-render-3-woman-holding-black-and-blue-tumbler-png-clipart_1593206709107?alt=media&token=a42c3f00-89d2-4ce1-9893-da0a5c039f6e

There are several steps to handle a firebase storage image URL.

Explanation is also included in the code for reference and understanding.

pi0 commented 2 years ago

Thanks for spending time and working on this pull request @gabrielsze but i don't think it is the best idea to include firebase encoding conditions inside ipx. Let's track it in https://github.com/nuxt/image/issues/435 i will do my best to investigate and help.