Skip to content

Commit

Permalink
린트
Browse files Browse the repository at this point in the history
  • Loading branch information
shinwonse committed Oct 6, 2024
1 parent 0147d76 commit 29503da
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/utils/rehypeImage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ const processImageNode = async (node: Element, index: number) => {
node.properties.loading = index ? 'lazy' : 'eager';
node.properties.width = SIZE;
node.properties.height = Math.round(height * (SIZE / width));
node.properties.style = index
? `background: url('data:image/webp;base64,${placeholder}')`
: '';
node.properties.style = index ? `background: url('data:image/webp;base64,${placeholder}')` : '';
};

export const rehypeImage = async ({ children }: { children: Element[] }) => {
Expand Down

0 comments on commit 29503da

Please sign in to comment.