Christian Riesen
Fullstack Web Developer at Liip. Creator of rokka.io. Focus on API's, image handling and large scale applications.
him/he
Developer at liip.ch
Creator of rokka.io
Human, I swear
"Why am I not doing this already?"
"This is fine"
Serving images and app from same server
Lots of traffic on images slows app
Server not optimized for either
Use different server for images
Use different domain (connection pools)
Optimize servers by task
Overwriting a file path is bad
"Just reload with shift", yes, tell every user that
Each browser is it's own unique snowflake
Each users environment too
Image content changes? URL must change!
Optimize for this pattern, not "nice URL's" for images
Send headers to cache for a year
Fastest byte is the one you don't have to send
One connection, multiple ressources
Faster transfer, no ramp up for each image
Less resources on server needed
Use it for your images
Safe fallback to HTTP/1
Supported by all current browsers
No excuses
Come on!!!1!
Make image URLs https://
https:// images can be used in http:// sites
No "security" warnings anywhere
Make image URLs https://
https:// images can be used in http:// sites
No "security" warnings anywhere
Get highest resolution source image
Don't throw away source files
Scaling down is fine
Scaling up looks like 💩
Always scale from originals
Format matters depending on content
Â
https://liip.rokka.io/www_liiperbig/70dc39c389a9fd1e5f120b1c83661866720da7e7/christian-riesen.jpg
https://liip.rokka.io/www_liiperbig/70dc39c389a9fd1e5f120b1c83661866720da7e7/christian-riesen.jpg
https://liip.rokka.io/www_liiperbig/70dc39c389a9fd1e5f120b1c83661866720da7e7/christian-riesen.jpg
https://liip.rokka.io/www_liiperbig/70dc39c389a9fd1e5f120b1c83661866720da7e7/christian-riesen.jpg
https://liip.rokka.io/www_liiperbig/70dc39c389a9fd1e5f120b1c83661866720da7e7/christian-riesen.jpg
https://liip.rokka.io/www_liiperbig/70dc39c389a9fd1e5f120b1c83661866720da7e7.jpg
The bad way...
By default, read from EXIF data
Can be set by hand per source image
Public images
Any size or volume (very low to very high)
Integrated into CMS, custom application
Where performance is important (hint: everywhere)
Web as well as mobile
As infrastructure service for other services
So you don't have to
https://rokka.io
https://www.liip.ch
https://rokka.io
https://www.liip.ch
I have one more cool thing, do you want to see it?
https://rokka.io
https://www.liip.ch
I'm done now, for real
By Christian Riesen
Web images done right
Fullstack Web Developer at Liip. Creator of rokka.io. Focus on API's, image handling and large scale applications.