File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 1+ {{ if not (.Get "src") }}
2+ {{ errorf "Img shortcode error: Missing value for param 'src': %s" .Position }}
3+ {{ end }}
14{{- if eq (.Get "popup") "false" -}}
25 {{- $.Scratch.Set "popup" "false" -}}
36{{- else -}}
811{{- $img_height := .Get "height" -}}
912{{- $wide := .Get "wide" -}}
1013{{- $video := .Get "video" -}}
11- {{- $local_ref := (.Get "src") -}}
12- {{- $hash_ref := $local_ref -}}
13- {{- $.Scratch.Add "_img" (print "images/" $hash_ref) -}}
14- {{- $img := $.Scratch.Get "_img" -}}
14+ {{- $src := (.Get "src") -}}
15+ {{- $img := (print .Site.Params.img_url "images/" $src) -}}
16+
1517{{- $image_type_arr := split (.Get "src") "." -}}
1618{{- $image_ext := index $image_type_arr 1 -}}
1719{{- if $wide -}}
4446 playsinline
4547 autoplay
4648 loop >
47- < source src ="{{ print $img | relURL }} "
49+ < source src ="{{ ( print "/images/" $src) | relURL }}"
4850 type="video/mp4"
4951 media="(min-width: 0px)" >
5052 < div class ="play "> </ div >
You can’t perform that action at this time.
0 commit comments