diff --git a/internal/reader/sanitizer/sanitizer.go b/internal/reader/sanitizer/sanitizer.go index 88b5261e..21e95055 100644 --- a/internal/reader/sanitizer/sanitizer.go +++ b/internal/reader/sanitizer/sanitizer.go @@ -181,11 +181,7 @@ func sanitizeAttributes(baseURL, tagName string, attributes []html.Attribute) ([ } if tagName == "img" && (attribute.Key == "width" || attribute.Key == "height") { - if !isPositiveInteger(value) { - continue - } - - if isImageLargerThanLayout { + if isImageLargerThanLayout || !isPositiveInteger(value) { continue } }