Skip to content

Commit

Permalink
feat: add width and height
Browse files Browse the repository at this point in the history
  • Loading branch information
kpitn committed Jan 26, 2024
1 parent b24476a commit 3972004
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Model/Display.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public function getImage(string $imagePath, int $width, int $height, array $para
$mainSrcset .= $this->getBreakPointImages($imagePath, $width *2, $height *2, $resize);
}

$html .= '<img loading="lazy" alt="' . $alt . '" title="' . $title . '" class="' . $class . '" ' . ($placeholder ? ' src="' . $placeholderImageUrl . '"' : '') . ' data-src="' . $mainImageUrl . '" data-srcset="' . $mainSrcset . '"/>';
$html .= '<img loading="lazy" alt="' . $alt . '" title="' . $title . '" class="' . $class . '" ' . ($placeholder ? ' src="' . $placeholderImageUrl . '"' : '') . ' width="' . $width . '" height="' . $height . '" data-src="' . $mainImageUrl . '" data-srcset="' . $mainSrcset . '"/>';
$html .= '</picture>';

return $html;
Expand Down

0 comments on commit 3972004

Please sign in to comment.