fddigital-uk / sanity-plugin-visual-options

19 stars 7 forks source link

Accept Any Image #3

Closed fddigital-uk closed 1 year ago

fddigital-uk commented 4 years ago

Currently the project only accepts React components, and has only been tested with SVGs being returned. Consider allowing use of standard images such as PNGs and JPGs.

nicktaylor commented 1 year ago

Closing as this can be achieved by setting the icon in the following way:

{
  ...,
  icon: () => <img src="/path/to/image.png" />
}

import React from 'react' will be required within the schema file for this to work.