DEV Community

Wachira
Wachira

Posted on

6

How does Dev.to give rich link image previews of articles with no cover images?

richlinkpreview
This is an article whose author did not provide a cover image but Dev.to is able to generate an image with the title. The image acts as a placeholder in rich link previews

My question is how can I do that.

Top comments (3)

Collapse
 
rhymes profile image
rhymes

DEV is using this service: HTML/CSS to Image API - basically you pass the markup and the styling and they give you back an image.

It's built by a DEV member, @mscccc :

Collapse
 
coreyja profile image
Corey Alexander

Wow this is perfect! I was just looking at Themer (themer.dev/), which can output backgrounds as SVGs that Chrome can load. This looks like an awesome programmatic way to convert these to 'standard' image formats!

Love when all my random browsings meld well together!

Collapse
 
wchr profile image
Wachira

Thanks @rhymes ,

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay