mirror of
https://github.com/pheralb/svgl.git
synced 2025-02-06 06:58:04 +08:00
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:
commit
e814a3c7ec
@ -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 -->
|
||||
|
Loading…
x
Reference in New Issue
Block a user