Skip to content

Add image fetching utility functions#1995

Merged
Mrtenz merged 4 commits intomainfrom
mrtenz/image-utils
Nov 30, 2023
Merged

Add image fetching utility functions#1995
Mrtenz merged 4 commits intomainfrom
mrtenz/image-utils

Conversation

@Mrtenz
Copy link
Copy Markdown
Member

@Mrtenz Mrtenz commented Nov 28, 2023

This adds two new functions which can be used for fetching images (PNG, JPG) in a Snap:

  • getImageData: Returns the raw image data string, which can be used as a href in an SVG image.
  • getImageComponent: Returns an image component which can be used in Snaps UI.

Closes MetaMask/MetaMask-planning#1573.

@Mrtenz Mrtenz force-pushed the mrtenz/image-utils branch from 5c32270 to 327fcd5 Compare November 29, 2023 12:43
@Mrtenz Mrtenz marked this pull request as ready for review November 29, 2023 12:47
@Mrtenz Mrtenz requested a review from a team as a code owner November 29, 2023 12:47
@codecov
Copy link
Copy Markdown

codecov bot commented Nov 29, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1cd649d) 96.06% compared to head (5c0b518) 96.08%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1995      +/-   ##
==========================================
+ Coverage   96.06%   96.08%   +0.01%     
==========================================
  Files         266      267       +1     
  Lines        6202     6227      +25     
  Branches      999     1005       +6     
==========================================
+ Hits         5958     5983      +25     
  Misses        244      244              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Mrtenz
Copy link
Copy Markdown
Member Author

Mrtenz commented Nov 30, 2023

@metamaskbot update-pr

@Mrtenz Mrtenz force-pushed the mrtenz/image-utils branch from 35c2c5b to 5c0b518 Compare November 30, 2023 15:12
@Mrtenz Mrtenz merged commit 4bbc881 into main Nov 30, 2023
@Mrtenz Mrtenz deleted the mrtenz/image-utils branch November 30, 2023 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants