Url local image for fancygallery

Have you joined data:image/png;base64, tio base64 output

yes
copy and paste i did

Try to change base 64 extension you used.

Use Absolute Path of image that start with file:///

i used an online website https://www.base64-image.de/
i'll try again

error could not save one or more file

Upload image to imgbb how i made in

What about providing a screenshot of your relevant blocks?
Taifun

Fire-Shot-Webpage-Screenshot-017-MIT-App-Inventor-ai2-appinventor-mit-edu

No problem for me to building apk with base64 image

what did you use to compress to base64
and can you post a screenshot of your blocks
thx

I used https://base64.guru/
but you can use an extension to encode image e.g
[Free] Base 64 extension. File to/from Base 64

Hi.
how to use photos in Google Drive?
https://drive.google.com/uc?export=view&id=ID
or
...?

I've never tested this feature, but I think a shareable link should work

No, don't work. any model of google drive link
https://drive.google.com/uc?export=view&id=ID
or
https://drive.google.com/uc?export=download&id=ID
or
https://drive.google.com/file/d/ID/view?usp=drive_link

why? :thinking:

Here is probably why:

2 Likes

Do you suggest a solution ? (other than downloading the file.)

As suggested in the link, use a different hosting service, I am.

2 Likes

But, Google Drive link, working on picture component. why? :thinking:

fancy gallery extension is managed via javascript, and as you read in the article posted by @TIMAI2 the image is loaded as if it were an Iframe and therefore not recognized by the img tag as a correct element

1 Like

I found a solution.
Use a thumbnail to load the image into fancyGallery from the google drive link.
example:
https://drive.google.com/thumbnail?id= +id of your image link.
You can also specify the size of the thumbnail:
https://drive.google.com/thumbnail?id= +id of your image link+&sz=w640.
For me this link works fine:
https://drive.google.com/thumbnail?id=1DlTneR_41y-MNEuzUuqqaR5H0pXy0Sb0&sz=w640

Source:
https://codepen.io/raulpenate/pen/wvOozzw

2 Likes