Add support for responsive images (#439)

This commit is contained in:
Maruan 2021-10-30 16:26:55 -04:00 committed by GitHub
parent 9c36be1320
commit 174024e76c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
45 changed files with 111 additions and 62 deletions

View File

@ -6,6 +6,7 @@ group :jekyll_plugins do
gem 'jekyll-feed'
gem 'jekyll-github-metadata'
gem 'jekyll-paginate-v2'
gem 'jekyll-responsive-image'
gem 'jekyll-scholar'
gem 'jekyll-sitemap'
gem 'jekyll-target-blank'

View File

@ -144,6 +144,7 @@ plugins:
- jekyll-feed
- jekyll-github-metadata
- jekyll-paginate-v2
- jekyll-responsive-image
- jekyll-sitemap
- jekyll-target-blank
- jekyll-twitter-plugin
@ -181,6 +182,24 @@ scholar:
query: "@*"
# -----------------------------------------------------------------------------
# Jekyll Responsive Images
# -----------------------------------------------------------------------------
responsive_image:
template: _includes/responsive_img.html
# Quality to use when resizing images.
default_quality: 80
sizes:
- width: 480
- width: 800
- width: 1400
quality: 90
# Strip EXIF and other JPEG profiles. Helps to minimize JPEG size.
strip: true
# -----------------------------------------------------------------------------
# Jekyll Diagrams
# -----------------------------------------------------------------------------

View File

@ -6,7 +6,10 @@
{% endif %}
<div class="card hoverable">
{% if project.img %}
<img src="{{ project.img | relative_url }}" alt="project thumbnail">
{% responsive_image_block %}
path: {{ project.img }}
alt: "project thumbnail"
{% endresponsive_image_block %}
{% endif %}
<div class="card-body">
<h2 class="card-title text-lowercase">{{ project.title }}</h2>

View File

@ -8,7 +8,10 @@
<div class="row g-0">
{% if project.img %}
<div class="card-img col-md-6">
<img src="{{ project.img | relative_url }}" alt="project thumbnail">
{% responsive_image_block %}
path: {{ project.img }}
alt: "project thumbnail"
{% endresponsive_image_block %}
</div>
<div class="col-md-6">
{% else %}

View File

@ -0,0 +1,8 @@
{% assign largest = resized | sort: 'width' | last %}
{% capture srcset %}
{% for i in resized %}
{{ i.path | relative_url }} {{ i.width }}w,
{% endfor %}
{% endcapture %}
<img {% if class %}class="{{ class }}"{% endif %} src="{{ largest.path | relative_url }}" srcset="{{ srcset | strip_newlines }}/ {{ path }} {{ original.width }}w" {% if alt %}alt="{{ alt }}"{% endif %} {% if title %}title="{{ title }}"{% endif %} {% if zoomable %}data-zoomable{% endif %}/>

View File

@ -15,7 +15,10 @@ layout: default
{% if page.profile %}
<div class="profile float-{% if page.profile.align == 'left' %}left{% else %}right{% endif %}">
{% if page.profile.image %}
<img class="img-fluid z-depth-1 rounded" src="{{ page.profile.image | prepend: '/assets/img/' | relative_url }}">
{% responsive_image_block %}
path: {{ page.profile.image | prepend: 'assets/img/' }}
class: "img-fluid z-depth-1 rounded"
{% endresponsive_image_block %}
{% endif %}
{% if page.profile.address %}
<div class="address">

View File

@ -8,10 +8,10 @@ This is an example post with image galleries.
<div class="row mt-3">
<div class="col-sm mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ site.baseurl }}/assets/img/9.jpg">
{% responsive_image path: assets/img/9.jpg class: "img-fluid rounded z-depth-1" %}
</div>
<div class="col-sm mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ site.baseurl }}/assets/img/7.jpg">
{% responsive_image path: assets/img/7.jpg class: "img-fluid rounded z-depth-1" %}
</div>
</div>
<div class="caption">
@ -23,10 +23,10 @@ Simply add `data-zoomable` to `<img>` tags that you want to make zoomable.
<div class="row mt-3">
<div class="col-sm mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ site.baseurl }}/assets/img/8.jpg" data-zoomable>
{% responsive_image path: assets/img/8.jpg class: "img-fluid rounded z-depth-1" zoomable: true %}
</div>
<div class="col-sm mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ site.baseurl }}/assets/img/10.jpg" data-zoomable>
{% responsive_image path: assets/img/10.jpg class: "img-fluid rounded z-depth-1" zoomable: true %}
</div>
</div>
@ -34,12 +34,12 @@ The rest of the images in this post are all zoomable, arranged into different mi
<div class="row mt-3">
<div class="col-sm mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ site.baseurl }}/assets/img/11.jpg" data-zoomable>
{% responsive_image path: assets/img/11.jpg class: "img-fluid rounded z-depth-1" zoomable: true %}
</div>
<div class="col-sm mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ site.baseurl }}/assets/img/12.jpg" data-zoomable>
{% responsive_image path: assets/img/12.jpg class: "img-fluid rounded z-depth-1" zoomable: true %}
</div>
<div class="col-sm mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ site.baseurl }}/assets/img/7.jpg" data-zoomable>
{% responsive_image path: assets/img/7.jpg class: "img-fluid rounded z-depth-1" zoomable: true %}
</div>
</div>

View File

@ -2,7 +2,7 @@
layout: page
title: project 1
description: a project with a background image
img: /assets/img/12.jpg
img: assets/img/12.jpg
importance: 1
category: work
---
@ -22,13 +22,13 @@ To give your project a background in the portfolio page, just add the img tag to
<div class="row">
<div class="col-sm mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/1.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/1.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
<div class="col-sm mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/3.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/3.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
<div class="col-sm mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/5.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/5.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
</div>
<div class="caption">
@ -36,7 +36,7 @@ To give your project a background in the portfolio page, just add the img tag to
</div>
<div class="row">
<div class="col-sm mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/5.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/5.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
</div>
<div class="caption">
@ -50,10 +50,10 @@ You describe how you toiled, sweated, *bled* for your project, and then... you r
<div class="row justify-content-sm-center">
<div class="col-sm-8 mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/6.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/6.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
<div class="col-sm-4 mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/11.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/11.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
</div>
<div class="caption">
@ -66,13 +66,15 @@ Just wrap your images with `<div class="col-sm">` and place them inside `<div cl
To make images responsive, add `img-fluid` class to each; for rounded corners and shadows use `rounded` and `z-depth-1` classes.
Here's the code for the last row of images above:
{% raw %}
```html
<div class="row justify-content-sm-center">
<div class="col-sm-8 mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/6.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/6.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
<div class="col-sm-4 mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/11.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/11.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
</div>
```
{% endraw %}

View File

@ -2,7 +2,7 @@
layout: page
title: project 2
description: a project with a background image
img: /assets/img/3.jpg
img: assets/img/3.jpg
importance: 2
category: work
---
@ -22,13 +22,13 @@ To give your project a background in the portfolio page, just add the img tag to
<div class="row">
<div class="col-sm mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/1.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/1.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
<div class="col-sm mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/3.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/3.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
<div class="col-sm mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/5.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/5.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
</div>
<div class="caption">
@ -36,7 +36,7 @@ To give your project a background in the portfolio page, just add the img tag to
</div>
<div class="row">
<div class="col-sm mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/5.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/5.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
</div>
<div class="caption">
@ -50,10 +50,10 @@ You describe how you toiled, sweated, *bled* for your project, and then... you r
<div class="row justify-content-sm-center">
<div class="col-sm-8 mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/6.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/6.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
<div class="col-sm-4 mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/11.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/11.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
</div>
<div class="caption">
@ -66,13 +66,15 @@ Just wrap your images with `<div class="col-sm">` and place them inside `<div cl
To make images responsive, add `img-fluid` class to each; for rounded corners and shadows use `rounded` and `z-depth-1` classes.
Here's the code for the last row of images above:
{% raw %}
```html
<div class="row justify-content-sm-center">
<div class="col-sm-8 mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/6.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/6.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
<div class="col-sm-4 mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/11.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/11.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
</div>
```
{% endraw %}

View File

@ -2,7 +2,7 @@
layout: page
title: project 3
description: a project that redirects to another website
img: /assets/img/7.jpg
img: assets/img/7.jpg
redirect: https://unsplash.com
importance: 3
category: work
@ -23,13 +23,13 @@ To give your project a background in the portfolio page, just add the img tag to
<div class="row">
<div class="col-sm mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/1.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/1.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
<div class="col-sm mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/3.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/3.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
<div class="col-sm mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/5.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/5.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
</div>
<div class="caption">
@ -37,7 +37,7 @@ To give your project a background in the portfolio page, just add the img tag to
</div>
<div class="row">
<div class="col-sm mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/5.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/5.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
</div>
<div class="caption">
@ -51,10 +51,10 @@ You describe how you toiled, sweated, *bled* for your project, and then... you r
<div class="row justify-content-sm-center">
<div class="col-sm-8 mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/6.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/6.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
<div class="col-sm-4 mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/11.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/11.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
</div>
<div class="caption">
@ -67,13 +67,15 @@ Just wrap your images with `<div class="col-sm">` and place them inside `<div cl
To make images responsive, add `img-fluid` class to each; for rounded corners and shadows use `rounded` and `z-depth-1` classes.
Here's the code for the last row of images above:
{% raw %}
```html
<div class="row justify-content-sm-center">
<div class="col-sm-8 mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/6.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/6.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
<div class="col-sm-4 mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/11.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/11.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
</div>
```
{% endraw %}

View File

@ -22,13 +22,13 @@ To give your project a background in the portfolio page, just add the img tag to
<div class="row">
<div class="col-sm mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/1.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/1.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
<div class="col-sm mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/3.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/3.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
<div class="col-sm mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/5.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/5.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
</div>
<div class="caption">
@ -36,7 +36,7 @@ To give your project a background in the portfolio page, just add the img tag to
</div>
<div class="row">
<div class="col-sm mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/5.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/5.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
</div>
<div class="caption">
@ -50,10 +50,10 @@ You describe how you toiled, sweated, *bled* for your project, and then... you r
<div class="row justify-content-sm-center">
<div class="col-sm-8 mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/6.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/6.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
<div class="col-sm-4 mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/11.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/11.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
</div>
<div class="caption">
@ -66,13 +66,15 @@ Just wrap your images with `<div class="col-sm">` and place them inside `<div cl
To make images responsive, add `img-fluid` class to each; for rounded corners and shadows use `rounded` and `z-depth-1` classes.
Here's the code for the last row of images above:
{% raw %}
```html
<div class="row justify-content-sm-center">
<div class="col-sm-8 mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/6.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/6.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
<div class="col-sm-4 mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/11.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/11.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
</div>
```
{% endraw %}

View File

@ -2,7 +2,7 @@
layout: page
title: project 5
description: a project with a background image
img: /assets/img/1.jpg
img: assets/img/1.jpg
importance: 3
category: fun
---
@ -22,13 +22,13 @@ To give your project a background in the portfolio page, just add the img tag to
<div class="row">
<div class="col-sm mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/1.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/1.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
<div class="col-sm mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/3.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/3.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
<div class="col-sm mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/5.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/5.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
</div>
<div class="caption">
@ -36,7 +36,7 @@ To give your project a background in the portfolio page, just add the img tag to
</div>
<div class="row">
<div class="col-sm mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/5.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/5.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
</div>
<div class="caption">
@ -50,10 +50,10 @@ You describe how you toiled, sweated, *bled* for your project, and then... you r
<div class="row justify-content-sm-center">
<div class="col-sm-8 mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/6.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/6.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
<div class="col-sm-4 mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/11.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/11.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
</div>
<div class="caption">
@ -66,13 +66,15 @@ Just wrap your images with `<div class="col-sm">` and place them inside `<div cl
To make images responsive, add `img-fluid` class to each; for rounded corners and shadows use `rounded` and `z-depth-1` classes.
Here's the code for the last row of images above:
{% raw %}
```html
<div class="row justify-content-sm-center">
<div class="col-sm-8 mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/6.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/6.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
<div class="col-sm-4 mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/11.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/11.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
</div>
```
{% endraw %}

View File

@ -22,13 +22,13 @@ To give your project a background in the portfolio page, just add the img tag to
<div class="row">
<div class="col-sm mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/1.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/1.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
<div class="col-sm mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/3.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/3.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
<div class="col-sm mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/5.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/5.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
</div>
<div class="caption">
@ -36,7 +36,7 @@ To give your project a background in the portfolio page, just add the img tag to
</div>
<div class="row">
<div class="col-sm mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/5.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/5.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
</div>
<div class="caption">
@ -50,10 +50,10 @@ You describe how you toiled, sweated, *bled* for your project, and then... you r
<div class="row justify-content-sm-center">
<div class="col-sm-8 mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/6.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/6.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
<div class="col-sm-4 mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/11.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/11.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
</div>
<div class="caption">
@ -66,13 +66,15 @@ Just wrap your images with `<div class="col-sm">` and place them inside `<div cl
To make images responsive, add `img-fluid` class to each; for rounded corners and shadows use `rounded` and `z-depth-1` classes.
Here's the code for the last row of images above:
{% raw %}
```html
<div class="row justify-content-sm-center">
<div class="col-sm-8 mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/6.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/6.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
<div class="col-sm-4 mt-3 mt-md-0">
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/11.jpg' | relative_url }}" alt="" title="example image"/>
{% responsive_image path: assets/img/11.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
</div>
</div>
```
{% endraw %}

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 573 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 438 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB