Comments (1)
Ideally we need to find a jekyll plugin that reads the asset folder and generate resized version of all the pictures used, so that we can serve different images according to devices thanks to the <picture>
element.
We use this solution on signavio.com, this is an example of the code:
<picture>
<source media="(min-width: 768px)"
srcset="https://www.signavio.com/wp-content/uploads/2016/10/webinar-signavio-zespri-apac.jpg?w=1500&h=600&zc=1 1500w,
https://www.signavio.com/wp-content/uploads/2016/10/webinar-signavio-zespri-apac.jpg?w=1280&h=512&zc=1 1280w,
https://www.signavio.com/wp-content/uploads/2016/10/webinar-signavio-zespri-apac.jpg?w=1000&h=400&zc=1 1000w,
https://www.signavio.com/wp-content/uploads/2016/10/webinar-signavio-zespri-apac.jpg?w=800&h=320&zc=1 800w"
sizes="100vw" >
<source media="(max-width: 767px)"
srcset="https://www.signavio.com/wp-content/uploads/2016/10/webinar-signavio-zespri-apac.jpg?w=800&h=525&zc=1 800w,
https://www.signavio.com/wp-content/uploads/2016/10/webinar-signavio-zespri-apac.jpg?w=640&h=420&zc=1 640w" >
<img src="https://www.signavio.com/wp-content/uploads/2016/10/webinar-signavio-zespri-apac.jpg?w=1500&h=600&zc=1" alt="Simplifying Global Supply Chains with BPM - Zespri's Story" />
</picture>
The above code not only provide different resolutions, it takes care of serving images with a different size ration to mobile devices.
I did a quick research and I found a couple of plugins that may be used:
- https://github.com/nidi3/jekyll-image_optimizer
- https://github.com/robwierzbowski/jekyll-picture-tag
Let me know if you have questions on the topic.
from tech-blog.
Related Issues (19)
- Footer layout mobile HOT 2
- Tell the world about substyle HOT 2
- Why you should / shouldn't do rich-text
- A world with Ext and react
- A road to quality gates
- Keep the lights on
- The quest to common code
- Theming front ends
- Sandboxing Scripts
- How to create an icon font
- monitor execution of database statements with Sniffy
- Integrate the blog with analytics
- Track blog impressions
- Post gallery layout broken on page load HOT 2
- Home Featured images have a gap at the bottom HOT 1
- Tiles are still overlapping when homepage is loaded HOT 1
- Reactive programming with JavaRx
- The benefit of Kotlin coroutines
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tech-blog.