How to format Image to be used in XY field type?

Hi,
I have an ENUM filed called SELECT IMAGE with base type image.
I have another field called DEFECT LOCATION with XY field type.

I want to use Image from the SELECT IMAGE field to be the base image for DEFECT LOCATION field.

It is straightforward if the image is .jpg or .png.

But in my case, the Images are google drive links which I converted to this format
(https://drive.google.com/uc?export=view&id=[FILEID]" to be able to show them in the app. And it works I can show the images in the SELECT IMAGE field.

But it doesn’t pick the Image in XY field type (Background image for the XY coordinates). (Maybe because the image is not .jpg or .png)

Is there any way to achieve this without having to put .jpg or .png files in SELECT IMAGE field. There will be 100’s of images and converting them all to .jpg or .png is a big hassle.

@praveen @Aleksi

What format are the files in?

Also, if you remove the select image field, how will people select which image they wish to use as the XY background?

Hi,
The files are google drive links.
For ex : https://drive.google.com/uc?export=view&id=1vyq04CjqMXsag953NCd7xZNDB-jI2-GT

And I won’t remove the Select image field. It is required to let people select the base image for XY background.

Can we make the image file in above format work for XY background?
I know it works when I have .jpg or .png file.

This might be something to do with only those types being supported.

@Aleksi

This should work. Are your images shared as “Anyone on the internet can find and view”?

1 Like

As far as I see, the Background image for the XY coordinates has to be an URL (or an expression that creates an URL). Perhaps it will not work with a Google Drive Link.

Maybe you could try this workarround?

1 Like

You can use image from Google Drive with the syntax https://drive.google.com/uc?export=view&id={fileID}. Though that image needs to be shared as "Anyone on the internet can find and view”

3 Likes

Thank you @Aleksi for this valuable information.

Thanks, Aleksi. It works perfectly.

You’re welcome

Hey Aleksi,

I just raised another issue.
If possible can you please assist with this?

Answered in that post.

1 Like

Hello, If I have an image called picture1 on my google drive folder: /My Unit/Images, what would be the {fileID}?

https://docs.meiro.io/books/meiro-integrations/page/where-can-i-find-the-file-id-on-google-drive

2 Likes