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

Solved Solved
1 14 2,909
1 ACCEPTED SOLUTION

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โ€

View solution in original post

14 REPLIES 14

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โ€?

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?

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โ€

Thank you @Aleksi for this valuable information.

Thanks, Aleksi. It works perfectly.

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

Youโ€™re welcome

Hey Aleksi,

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

Answered in that post.

Thanks @Yogesh_laddha,
The key for me was realising that the default link format from Google Drive did not load but your format with the ID from the default link does. I was tearing my hair out until I found your suggested link format. Many thanks again.

Top Labels in this Space