Merge pull request #225 from ivanosquis10/fixing-performance-errors-svgs

📦 Added height and width properties for img tags containing svgs
This commit is contained in:
Pablo Hdez 2024-01-24 11:50:21 +00:00 committed by GitHub
commit e814a3c7ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -146,6 +146,10 @@
// Icon Stroke & Size:
let iconStroke = 1.8;
let iconSize = 16;
// Width & Height of <img>:
const width = 40;
const height = 40;
</script>
<CardSpotlight>
@ -160,6 +164,8 @@
alt={svgInfo.title}
title={svgInfo.title}
loading="lazy"
{width}
{height}
/>
<img
class="block dark:hidden mb-4 mt-2 h-10"
@ -169,6 +175,8 @@
alt={svgInfo.title}
title={svgInfo.title}
loading="lazy"
{width}
{height}
/>
{:else}
<img
@ -177,6 +185,8 @@
alt={svgInfo.title}
title={svgInfo.title}
loading="lazy"
{width}
{height}
/>
<img
class="block dark:hidden mb-4 mt-2 h-10"
@ -184,6 +194,8 @@
alt={svgInfo.title}
title={svgInfo.title}
loading="lazy"
{width}
{height}
/>
{/if}
<!-- Title -->