artsy / positron

Positron is Artsy Writer or the editorial tool and API for Artsy.
MIT License
85 stars 42 forks source link

Multiple image resources for full screen headers etc. #1092

Open owendodd opened 7 years ago

owendodd commented 7 years ago

Have been noticing that some of our full screen headers are a little sub par in terms of quality on large monitors, I'm wondering how we are currently handling image resources and if there is maybe an opportunity to upload larger files into writer, then create multiple sized assets to load at different viewport sizes

Thoughts @kanaabe @eessex

eessex commented 7 years ago

Currently images are being resized on the client side to 1250x1250, maybe there is a way to target this by device?

owendodd commented 7 years ago

Yeah that would be cool, like ideally we could have like 3-4 sizes. Small files for mobile, standard, and something much higher res for large screens / retina. 'image-set()' sorta does this but just based on display resolution.

kanaabe commented 7 years ago

@eessex a word of caution -- the larger the original file size, the slower the on-the-fly resizer becomes. We've seen issues in the past where people uploaded huge images and the resizer completely choked. While it might be a good in-between step, it doesn't let the user upload large images since the resizer can't actually support that.

It might be time to start thinking about using an image processing service like Gemini to watermark and generate multiple versions of an uploaded image, ie Artworks. https://github.com/artsy/positron/issues/1026 and https://github.com/artsy/positron/issues/771 are good examples of similar issues that could be solved by an image processing service.