DEV Community

Discussion on: Frontend Shorts: How to create link content previewer with React, Vue, and Vanilla JavaScript

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt • Edited

I guess getting images still need to be done manually, as getting dev.to image from your site will have to bypass CORS (still do-able with cors-anywhere.herokuapp.com)

The library for scraping is provided by Mozilla, here -- github.com/mozilla/page-metadata-p...

It is somewhat in my solution, here -- dev.to/patarapolw/is-there-a-tool-...

It seems that I have just found the PROPER REST service -- github.com/mozilla/page-metadata-s...

Collapse
 
mikenikles profile image
Mike

Interesting, thanks for sharing these projects. I just published an addition to Ilona's post here on dev.to that renders the preview card content at runtime, using a small backend service.

It's built with Svelte / Sapper, but the Mozilla service looks very compelling.