Skip to content

Commit b629ebd

Browse files
committed
fix: correct detection of static vector image path
1 parent 4ff5996 commit b629ebd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

layouts/_partials/assets/helpers/image-dimension.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@
6767
{{- if hasSuffix $src "svg" -}}
6868
{{- $res = partial "utilities/GetResource.html" (dict "url" $src "page" $args.page) -}}
6969
{{ if not $res }}
70-
{{- $targetURL := strings.TrimPrefix "/static" $src -}}
7170
{{- $u := urls.Parse site.BaseURL }}
72-
{{- $targetURL = strings.TrimPrefix $u.Path $src -}}
71+
{{- $targetURL := strings.TrimPrefix $u.Path $src -}}
72+
{{- $targetURL = strings.TrimPrefix "/static" $src -}}
7373
{{- if not (fileExists (path.Join "/static" $targetURL)) -}}
7474
{{ warnf "Cannot find vector image resource: %q" $src -}}
7575
{{ else }}

0 commit comments

Comments
 (0)