catherineriver / sanity-plugin-generate-ogimage

This Sanity plugin provides a tool to generate Open Graph (OG) images for your Sanity documents. It's designed to be flexible, allowing you to define custom layouts for the generated images.
MIT License
10 stars 1 forks source link

Adds a download button #3

Closed liamb13 closed 1 year ago

liamb13 commented 1 year ago

This PR replaces the single 'generateImage' function with 'generateImage' and 'downloadImage'.

There are times when I'd like to generate an image using fields from a document, but I don't require this to be saved as an asset.

Instead, I've added a 'downloadImage' function that is used in the Studio Tool. But also appears in the asset source component.