Skip to content

Conversation

@notclive
Copy link
Contributor

@notclive notclive commented Dec 7, 2023

Currently images must be defined at build time (as detailed in #56 and #48). This feature provides a mechanism to add dynamic images.

@notclive notclive changed the title feat: support adding images from base64 data URLs feat: support adding images from HTTP and base64 data URLs Dec 7, 2023
}

if (!image.startsWith('res://')) {
image = path.join(knownFolders.currentApp().path, image.replace('~/', ''));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This replacement of ~/ is already part of the nativescript library: https://github.com/NativeScript/NativeScript/blob/main/packages/core/image-source/index.android.ts#L120

@farfromrefug
Copy link
Member

@notclive looks really nice! did you had the chance to test it on iOS and android ?

@notclive
Copy link
Contributor Author

notclive commented Dec 7, 2023

Yes, tested on both Android and iOS (simulator)

@farfromrefug farfromrefug merged commit b34e3c8 into nativescript-community:master Dec 7, 2023
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.

2 participants