janniks / vue-notion

A fast Vue renderer for Notion pages
https://vue-notion.now.sh
Other
870 stars 62 forks source link

feat: opens the door for custom image attrs or component through props #74

Closed eliasparis closed 2 years ago

eliasparis commented 2 years ago

Hi @janniks , time ago I opened a feature request for vue-notion about open the posibility of render a custom Vue component for Images #61 so users can benefit from some per project tweaks like lazy-loading for example.

I included a prop in the <NotionRenderer /> that can configure that. If imageOptions prop is present it will spread its keys and values as element attributes. If it finds a key named "component", will test that to render Notion pictures.

Hope you find it useful, with that I was able to gain lots of improvement in page load a FTI numbers.

Thanks for your whole effort.

vercel[bot] commented 2 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/janniks/vue-notion/65nKavnHYrnvoq3WTRnZ6Znu9Fik
✅ Preview: https://vue-notion-git-fork-eliasparis-custom-image-options-janniks.vercel.app

janniks commented 2 years ago

Awesome, thanks for the contribution! I will go over this soon :)

janniks commented 2 years ago

Awesome work! Great idea with the additional spread attributes 💡 Released under 1.4.0