Skip to content

Commit b8110c2

Browse files
committed
Enable LQIP technique in lazy_image_tag with 'min: true' option
cf. LQIP technique https://github.com/aFarkas/lazysizes#lqipblurry-image-placeholderblur-up-image-technique
1 parent d328f49 commit b8110c2

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

app/views/events/index.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
- provide(:meta_image, "/img/ogp-events.jpeg")
55

66
%section.cover
7-
= lazy_image_tag 'events_cover.jpg', min: 'events_cover.min.jpg', alt: 'Cover Photo on Upcoming Events'
7+
= lazy_image_tag 'events_cover.jpg', alt: 'Cover Photo on Upcoming Events', min: true
88

99
%section#events.text-center
1010
%br

app/views/home/show.html.haml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
%br
66

77
%section.cover
8-
= lazy_image_tag '/coderdojo-japan_cover.jpg', min: '/coderdojo-japan_cover.min.jpg', alt: 'CoderDojo Japan カバー画像'
8+
= lazy_image_tag '/coderdojo-japan_cover.jpg', alt: 'CoderDojo Japan カバー画像', min: true
99

1010
%section.introduction.text-center.list
1111
%p
@@ -39,7 +39,7 @@
3939
次の動画や記事をぜひ!😆
4040
4141
%div.home-point-thumbnail{style: "margin-top: 30px; margin-bottom: 30px;"}
42-
= link_to lazy_image_tag('/video-thumbnail.jpg', min: '/video-thumbnail.min.jpg', alt: 'Promotion Video by CoderDojo Kashiwa'), 'https://www.youtube.com/watch?v=gLDue2xb1j8', target: "_blank", rel: "external noopener"
42+
= link_to lazy_image_tag('/video-thumbnail.jpg', alt: 'Promotion Video by CoderDojo Kashiwa', min: true), 'https://www.youtube.com/watch?v=gLDue2xb1j8', target: "_blank", rel: "external noopener"
4343
/%div.home-point-video
4444
/ %iframe{allowfullscreen: "", frameborder: "0", height: "315", width: "560",
4545
/ src: "https://www.youtube.com/embed/gLDue2xb1j8?rel=0"}
@@ -168,7 +168,7 @@
168168
%a{href: "/kata#support"}<> 『支援』
169169
をお読みください。
170170
%div.kata
171-
= link_to lazy_image_tag('/kata_cover.jpg', min: '/kata_cover.min.jpg', alt: 'Kata カバー画像', style: 'margin-bottom: 15px;'), '/kata'
171+
= link_to lazy_image_tag('/kata_cover.jpg', alt: 'Kata カバー画像', min: true, style: 'margin-bottom: 15px;'), '/kata'
172172
%a.button-to-details{href: '/kata'} Kata を読む
173173

174174
%section.detail-introduction.partners_logo.text-center#partners{style: "padding-top: 50px;"}

app/views/shared/_header.html.haml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@
88
%span.icon-bar
99
%span.icon-bar
1010
.navbar-header-logos
11-
= link_to lazy_image_tag('/img/header-logo.png', min: '/img/header-logo.min.png',
12-
alt: 'CoderDojo logo'), '/', id: "header-logo"
13-
= link_to lazy_image_tag('/img/header-brand.png', min: '/img/header-brand.min.png',
14-
alt: 'CoderDojo brand'), '/', id: "header-brand"
11+
= link_to lazy_image_tag('/img/header-logo.png', alt: 'CoderDojo logo', min: true), '/', id: "header-logo"
12+
= link_to lazy_image_tag('/img/header-brand.png', alt: 'CoderDojo brand', min: true), '/', id: "header-brand"
1513
#bs-example-navbar-collapse-1.collapse#header-nav-toggle.navbar-collapse
1614
%ul.nav.navbar-nav.navbar-right
1715
%li= link_to '全国の道場', '/#dojos'

0 commit comments

Comments
 (0)