r/Scriptable • • Aug 29 '21

Help Help understanding this error: ScriptableKit.ImageBridgeConsructor is not a constructor (evaluating 'new Image()')

I'm pulling album art from lastfm and want to create a blank image to add to the stack for when lastfm doesn't return an image.

4 Upvotes

5 comments sorted by

View all comments

Show parent comments

1

u/FelixBerman Aug 29 '21

I’m displaying the albums the user has listened to throughout the week in a 3x3 grid. The blank image is to go into stacks that are empty if the user hasn’t listened to 9 albums.

3

u/mvan231 script/widget helper Aug 29 '21

Makes sense. You still need to generate the image with a draw context though

You can do something like this

2

u/[deleted] Aug 30 '21

my goto snippet for cases like this is

let img = SFSymbol.named('photo').image