SlideShare una empresa de Scribd logo
1 de 47
Descargar para leer sin conexión
R E S P O N S I V E
I M A G E S
U N D E R C O N T R O L
@ c h u m i l l a s # d r u p a l m o u n t a i n c a m p
C R I S T I N A C H U M I L L A S
D E S I G N E R & D R U P A L F R O N T E N D
@chumillas
ckrina
T H E B A S I C S
R E S P O N S I V E I M A G E S I N D R U PA L
A R T D I R E C T I O N
L A Z Y L O A D I N G
R E S P O N S I V E I M A G E S
@ c h u m i l l a s # d r u p a l m o u n t a i n c a m p
P A G E W E I G H T
A V E R A G E
2016
2015
2014
2,26Mb
1,95Mb
2,48Mb
+16%
+15%
+10%
@ c h u m i l l a s # d r u p a l m o u n t a i n c a m p
6 1 %
web traffic
A S Y N C H R O N O U S
request
T O O B I G
for the device
F A C T S
@ c h u m i l l a s # d r u p a l m o u n t a i n c a m p
D E L I V E R T H E
H I G H E S T Q U A L I T Y
I M A G E S U P P O R T E D
A N D N O T H I N G M O R E .
T H E B A S I C S
Variables known by:
AUTHOR
when she’s writing the code?
BROWSER
when it’s loading the page?
viewport dimensions x YES
image size relative to the viewport YES YES via sizes!
screen density x YES
source files’ dimensions YES YES via srcset!
SOURCE https://ericportis.com/posts/2014/srcset-sizes
S C A L E D I M A G E
srcset=“large.jpg 1440w,

medium.jpg 960w,

small.jpg 480w”
sizes=“(min-width: 36em) 33.3vw,





src=“medium.jpg”
alt=“A road”>
100vw”
<img
S C A L E D I M A G E
srcset=“large.jpg 1440w,

medium.jpg 960w,

small.jpg 480w”
W I D T H I N P I X E L Sw
(1440px)

(960px)

(480px)
<img
sizes=“(min-width: 36em) 33.3vw,
100vw”
image {

width: 100vw;

}

@media (min-width: 36em) {

width: 33.3vw;

}
srcset=“large.jpg 1440w,

medium.jpg 960w,

small.jpg 480w”
<img
C S S M E D I A Q U E R I E Ssizes
srcset=“large.jpg 1440w,

medium.jpg 960w,

small.jpg 480w”
sizes=“(min-width: 36em) 33.3vw,





src=“medium.jpg”
alt=“A road”>
100vw”
<img
S C A L E D I M A G E
S C A L E D I M A G E S
A R T D I R E C T I O N
<picture>
@ c h u m i l l a s # d r u p a l m o u n t a i n c a m p
<source srcset=“image-small.jpg 1x,

image-small2x.jpg 2x”
<img src=“image-big.jpg 180w” />
media=“(min-width: 0px) and
(max-width: 29.99em)”>
<source srcset=“image-big.jpg 1x,
media=”(min-width: 30em)”>
image-big2x.jpg 2x”
</picture>
sizes=”(min-width: 30em) 33vw”>
<picture>
@ c h u m i l l a s
# d r u p a l m o u n t a i n c a m p
P I C T U R E
B R O W S E R S U P P O R T
Same for srcret and sizes
@ c h u m i l l a s
# d r u p a l m o u n t a i n c a m p
P I C T U R E F I L L
B R O W S E R S U P P O R T
A R E S P O N S I V E I M A G E P O L Y F I L L
http://scottjehl.github.io/picturefill/
D R U P A L
R E S P O N S I V E I M A G E S I N
@ c h u m i l l a s
# d r u p a l m o u n t a i n c a m p
R E S P O N S I V E I M A G E S ( P i c t u r e )
B R E A K P O I N T
Image,File,Field
M O D U L E S
@ c h u m i l l a s # d r u p a l m o u n t a i n c a m p
Import/
create

breakpoints
Create

Image styles
Create

Responsive

Images
Apply

Responsive

Images
1 2 3 4
P R O C E S S
@ c h u m i l l a s # d r u p a l m o u n t a i n c a m p
@media all and (min-width:851px)
{/*CSS*/}
1
B R E A K P O I N T S
W H A T A R E
@ c h u m i l l a s # d r u p a l m o u n t a i n c a m p
1
W H E R E
T H E M E S M O D U L E S
B R E A K P O I N T S
I M A G E S T Y L E S
By @marcdrummond https://www.youtube.com/watch?v=3BF5WE_NOIU
P L A N
385px
480px
+25%
+25%
300px
385px
480px
240px
300px
+25%
300px480px
385px
240px
+25%
240px
385px
480px
2
@ c h u m i l l a s # d r u p a l m o u n t a i n c a m p
Import/
create

breakpoints
Create

Image styles
Apply

Responsive

Images
1 2
3
4
3
SCALED IMG
PICTURE
R E S P O N S I V E I M A G E S
C R E A T E
3
@ c h u m i l l a s
# d r u p a l m o u n t a i n c a m p
srcset=“large.jpg 1440w,

medium.jpg 960w,

small.jpg 480w”
sizes=“(min-width: 36em) 33.3vw,





src=“medium.jpg”
alt=“A road”>
100vw”
<img
S C A L E D I M A G E
https://vimeo.com/204517230
https://vimeo.com/20451723
https://vimeo.com/204517211
<img src=“image-big.jpg 180w” />
<source srcset=“image-big.jpg 1x,
media=”(min-width: 30em)”>
image-big2x.jpg 2x”
</picture>
sizes=”(min-width: 30em) 33vw”>
<picture>
A R T D I R E C T I O N
https://vimeo.com/204517271
A R T
D I R E C T I O N
@ c h u m i l l a s # d r u p a l m o u n t a i n c a m p
@ c h u m i l l a s # d r u p a l m o u n t a i n c a m p
A R T D I R E C T I O N
R E S P O N S I V E I M A G E S
https://www.drupal.org/project/crop
@ c h u m i l l a s # d r u p a l m o u n t a i n c a m p
I M A G E W I D G E T C R O P
https://www.drupal.org/project/image_widget_crop
F U L L C O N T R O L
https://vimeo.com/204517111
F U L L C O N T R O L
L O N G
I M P L E M E N T A T I O N
G I V E S
R E Q U I R E S
@ c h u m i l l a s # d r u p a l m o u n t a i n c a m p
https://www.drupal.org/project/focal_point
F O C A L P O I N T
A U T O M A T E D
@ c h u m i l l a s # d r u p a l m o u n t a i n c a m p
https://vimeo.com/204517287
B A S I C 

A R T D I R E C T I O N
L O W E F F O R T
G I V E S
R E Q U I R E S
( R E A L L Y )
L A Z Y
L O A D I N G
@ c h u m i l l a s # d r u p a l m o u n t a i n c a m p
https://www.drupal.org/project/lazyloader
I M A G E L A Z Y L O A D E R
@ c h u m i l l a s # d r u p a l m o u n t a i n c a m p
@ c h u m i l l a s # d r u p a l m o u n t a i n c a m p
@ c h u m i l l a s # d r u p a l m o u n t a i n c a m p
video
https://vimeo.com/204517204
@ c h u m i l l a s # d r u p a l m o u n t a i n c a m p
• Plan your Responsive Images before
implementing.
• Use Focal Point if you don’t need full
control.
• Remember Lazyloading at home and
lists.
C O N C L U S I O N S
T H A N K S !
@ c h u m i l l a s
Q U E S T I O N S

Más contenido relacionado

Último

6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
@Chandigarh #call #Girls 9053900678 @Call #Girls in @Punjab 9053900678
 
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
nirzagarg
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
ydyuyu
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
JOHNBEBONYAP1
 
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Chandigarh Call girls 9053900678 Call girls in Chandigarh
 

Último (20)

Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
 
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
 
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
Wadgaon Sheri $ Call Girls Pune 10k @ I'm VIP Independent Escorts Girls 80057...
Wadgaon Sheri $ Call Girls Pune 10k @ I'm VIP Independent Escorts Girls 80057...Wadgaon Sheri $ Call Girls Pune 10k @ I'm VIP Independent Escorts Girls 80057...
Wadgaon Sheri $ Call Girls Pune 10k @ I'm VIP Independent Escorts Girls 80057...
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
 
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
 
Microsoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftMicrosoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck Microsoft
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
 
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort ServiceBusty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
 
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
 
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
 
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
 
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
 
Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...
Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...
Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...
 
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
 

Destacado

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Destacado (20)

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 

Responsive Images Under Control

  • 1. R E S P O N S I V E I M A G E S U N D E R C O N T R O L
  • 2. @ c h u m i l l a s # d r u p a l m o u n t a i n c a m p C R I S T I N A C H U M I L L A S D E S I G N E R & D R U P A L F R O N T E N D @chumillas ckrina
  • 3. T H E B A S I C S R E S P O N S I V E I M A G E S I N D R U PA L A R T D I R E C T I O N L A Z Y L O A D I N G R E S P O N S I V E I M A G E S
  • 4. @ c h u m i l l a s # d r u p a l m o u n t a i n c a m p P A G E W E I G H T A V E R A G E 2016 2015 2014 2,26Mb 1,95Mb 2,48Mb +16% +15% +10%
  • 5. @ c h u m i l l a s # d r u p a l m o u n t a i n c a m p 6 1 % web traffic A S Y N C H R O N O U S request T O O B I G for the device F A C T S
  • 6. @ c h u m i l l a s # d r u p a l m o u n t a i n c a m p D E L I V E R T H E H I G H E S T Q U A L I T Y I M A G E S U P P O R T E D A N D N O T H I N G M O R E .
  • 7. T H E B A S I C S
  • 8. Variables known by: AUTHOR when she’s writing the code? BROWSER when it’s loading the page? viewport dimensions x YES image size relative to the viewport YES YES via sizes! screen density x YES source files’ dimensions YES YES via srcset! SOURCE https://ericportis.com/posts/2014/srcset-sizes S C A L E D I M A G E
  • 9. srcset=“large.jpg 1440w,
 medium.jpg 960w,
 small.jpg 480w” sizes=“(min-width: 36em) 33.3vw,
 
 
 src=“medium.jpg” alt=“A road”> 100vw” <img S C A L E D I M A G E
  • 10. srcset=“large.jpg 1440w,
 medium.jpg 960w,
 small.jpg 480w” W I D T H I N P I X E L Sw (1440px)
 (960px)
 (480px) <img
  • 11. sizes=“(min-width: 36em) 33.3vw, 100vw” image {
 width: 100vw;
 }
 @media (min-width: 36em) {
 width: 33.3vw;
 } srcset=“large.jpg 1440w,
 medium.jpg 960w,
 small.jpg 480w” <img C S S M E D I A Q U E R I E Ssizes
  • 12. srcset=“large.jpg 1440w,
 medium.jpg 960w,
 small.jpg 480w” sizes=“(min-width: 36em) 33.3vw,
 
 
 src=“medium.jpg” alt=“A road”> 100vw” <img S C A L E D I M A G E
  • 13. S C A L E D I M A G E S
  • 14. A R T D I R E C T I O N
  • 15. <picture> @ c h u m i l l a s # d r u p a l m o u n t a i n c a m p
  • 16. <source srcset=“image-small.jpg 1x,
 image-small2x.jpg 2x” <img src=“image-big.jpg 180w” /> media=“(min-width: 0px) and (max-width: 29.99em)”> <source srcset=“image-big.jpg 1x, media=”(min-width: 30em)”> image-big2x.jpg 2x” </picture> sizes=”(min-width: 30em) 33vw”> <picture>
  • 17. @ c h u m i l l a s # d r u p a l m o u n t a i n c a m p P I C T U R E B R O W S E R S U P P O R T Same for srcret and sizes
  • 18. @ c h u m i l l a s # d r u p a l m o u n t a i n c a m p P I C T U R E F I L L B R O W S E R S U P P O R T A R E S P O N S I V E I M A G E P O L Y F I L L http://scottjehl.github.io/picturefill/
  • 19. D R U P A L R E S P O N S I V E I M A G E S I N
  • 20. @ c h u m i l l a s # d r u p a l m o u n t a i n c a m p R E S P O N S I V E I M A G E S ( P i c t u r e ) B R E A K P O I N T Image,File,Field M O D U L E S
  • 21. @ c h u m i l l a s # d r u p a l m o u n t a i n c a m p Import/ create
 breakpoints Create
 Image styles Create
 Responsive
 Images Apply
 Responsive
 Images 1 2 3 4 P R O C E S S
  • 22. @ c h u m i l l a s # d r u p a l m o u n t a i n c a m p @media all and (min-width:851px) {/*CSS*/} 1 B R E A K P O I N T S W H A T A R E
  • 23. @ c h u m i l l a s # d r u p a l m o u n t a i n c a m p 1 W H E R E T H E M E S M O D U L E S B R E A K P O I N T S
  • 24. I M A G E S T Y L E S By @marcdrummond https://www.youtube.com/watch?v=3BF5WE_NOIU P L A N 385px 480px +25% +25% 300px 385px 480px 240px 300px +25% 300px480px 385px 240px +25% 240px 385px 480px 2
  • 25. @ c h u m i l l a s # d r u p a l m o u n t a i n c a m p Import/ create
 breakpoints Create
 Image styles Apply
 Responsive
 Images 1 2 3 4 3 SCALED IMG PICTURE R E S P O N S I V E I M A G E S C R E A T E 3
  • 26. @ c h u m i l l a s # d r u p a l m o u n t a i n c a m p srcset=“large.jpg 1440w,
 medium.jpg 960w,
 small.jpg 480w” sizes=“(min-width: 36em) 33.3vw,
 
 
 src=“medium.jpg” alt=“A road”> 100vw” <img S C A L E D I M A G E
  • 29. <img src=“image-big.jpg 180w” /> <source srcset=“image-big.jpg 1x, media=”(min-width: 30em)”> image-big2x.jpg 2x” </picture> sizes=”(min-width: 30em) 33vw”> <picture> A R T D I R E C T I O N
  • 31. A R T D I R E C T I O N
  • 32. @ c h u m i l l a s # d r u p a l m o u n t a i n c a m p
  • 33. @ c h u m i l l a s # d r u p a l m o u n t a i n c a m p A R T D I R E C T I O N R E S P O N S I V E I M A G E S https://www.drupal.org/project/crop
  • 34. @ c h u m i l l a s # d r u p a l m o u n t a i n c a m p I M A G E W I D G E T C R O P https://www.drupal.org/project/image_widget_crop F U L L C O N T R O L
  • 36. F U L L C O N T R O L L O N G I M P L E M E N T A T I O N G I V E S R E Q U I R E S
  • 37. @ c h u m i l l a s # d r u p a l m o u n t a i n c a m p https://www.drupal.org/project/focal_point F O C A L P O I N T A U T O M A T E D
  • 38. @ c h u m i l l a s # d r u p a l m o u n t a i n c a m p https://vimeo.com/204517287
  • 39. B A S I C 
 A R T D I R E C T I O N L O W E F F O R T G I V E S R E Q U I R E S ( R E A L L Y )
  • 40. L A Z Y L O A D I N G
  • 41. @ c h u m i l l a s # d r u p a l m o u n t a i n c a m p https://www.drupal.org/project/lazyloader I M A G E L A Z Y L O A D E R
  • 42. @ c h u m i l l a s # d r u p a l m o u n t a i n c a m p
  • 43. @ c h u m i l l a s # d r u p a l m o u n t a i n c a m p
  • 44. @ c h u m i l l a s # d r u p a l m o u n t a i n c a m p video https://vimeo.com/204517204
  • 45. @ c h u m i l l a s # d r u p a l m o u n t a i n c a m p • Plan your Responsive Images before implementing. • Use Focal Point if you don’t need full control. • Remember Lazyloading at home and lists. C O N C L U S I O N S
  • 46. T H A N K S ! @ c h u m i l l a s
  • 47. Q U E S T I O N S