diff --git a/layouts/partials/cover.html b/layouts/partials/cover.html
index 7be43ea6..b4487329 100644
--- a/layouts/partials/cover.html
+++ b/layouts/partials/cover.html
@@ -8,7 +8,8 @@
{{- if $addLink }}{{ end -}}
{{- $sizes := (slice "360" "480" "720" "1080" "1500") }}
{{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif") }}
- {{- if (and (in $processableFormats $cover.MediaType.SubType) (ne .Site.Params.cover.responsiveImages false)) }}
+ {{- $prod := (eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production")) }}
+ {{- if (and (in $processableFormats $cover.MediaType.SubType) (ne .Site.Params.cover.responsiveImages false) (eq $prod true)) }}