A picture is worth a thousand words, why not put one in your Snap? #1932
Montoya
announced in
Announcements
Replies: 1 comment 1 reply
-
Hey, any plans to support external images? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Introducing: support for images in Snaps UI. You heard that right, you can now embed images in custom UI with the
image
component, now available in MetaMask Flask / stable 11.4. Try it out right now with the Mystery Fox Snap in MetaMask Flask!snaps_images_demo.mov
With the
image
component, you can insert an inline SVG or even nest an encoded PNG or JPG image inside an SVG. You can even use animated SVGs. You can try it out with the Snaps Simulator and generate example code. Here's example code for embedding a giant Ethereum logo:To use images in your Snaps, simply update your dependencies including
@metamask/snaps-ui
to the latest versions, make sure you are on version 11.4.x of MetaMask Flask, then use theimage
component with a valid SVG in any panel that supports custom UI. You can find examples with standard SVG, animated SVG, embedded PNG and embedded JPG in the source code for the Mystery Fox.Have questions? Feel free to ask here!
Beta Was this translation helpful? Give feedback.
All reactions