Last active
August 10, 2021 17:30
-
-
Save damien1/573a4621f5e1e0436e5157a17731b5ed to your computer and use it in GitHub Desktop.
Hugo shortcode responsive image using Cloudinary - how to use see https://bit.ly/2YYrjRd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- for how to use visit https://bit.ly/2YYrjRd --> | |
{{ $image := .Get 0 }} | |
{{ $alt := .Get 1 }} | |
{{ $width := .Get 2 | default "w_auto" }} | |
{{ $style := .Get 3 | default "width:90%" }} | |
<img alt="{{ $alt }}" title="{{ $alt }}" data-src="{{ $.Site.Params.cloudinary_base_url }}/{{ $width }},c_scale,f_auto,q_auto,dpr_auto{{ $image}}" class="cld-responsive border" style="{{ $style }}"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Before using this ...
You need to have: