Forum Discussion
New Image Function
Is it possible to reference images stored in a OneDrive folder?
I've tried copy the link from the OneDrive image and using
which gets me #CONNECT!
Any ideas
Thanks
Any site which requires authentication, includes OneDrive, doesn't work with IMAGE().
18 Replies
- OfficeUniverseCopper Contributor
Anthony Williams Here is the solution for pulling images from onedrive:
https://youtu.be/Z5HcAK5vNbk - MisterDabeCopper ContributorI was able to successfully use the excel IMAGE function when using a png file located on our companies SharePoint website. The png file location is authorization based and the account I use in excel is the same account that has access to the sharepoint website.
I used the use "view original" url which is available after clicking on the image file and selecting the three dots at the top.
Hope this helps. - Patrick2788Silver ContributorI believe you'll need to include the extension of the image in the URL. IMAGE supports BMP, JPG/JPEG, GIF, TIFF, PNG, ICO, and WEBP.
- Anthony WilliamsBrass ContributorLike this
=IMAGE("https://1drv.ms/u/s!AmbSxIyCxe5hktkARJfWxindUUDxyQ?e=OW2Gjb.jpg") - this didn't work. Have put the file type in the correct place?
I tried pasting this (Below) into a cell, and that took me to the correct image in my OneDrive
https://1drv.ms/u/s!AmbSxIyCxe5hktkARJfWxindUUDxyQ?e=OW2Gjb
I want to be able to have the image in the cell.
Thanks- TrampolineCopper Contributor
Anthony Williams I wonder if the problem here is that you're using a shortened URL in your IMAGE formula as opposed to a link which points directly to the picture itself (and not your OneDrive folder).
I have successfully used IMAGE to link to pictures which are stored on our company Sharepoint. Not exactly the same as OneDrive, but similar. The key was finding the direct URL to the picture.
When I click on your image link it opens up a full-length URL as follows:
https://onedrive.live.com/?authkey=%21AESX1sYp3VFA8ck&cid=61EEC5828CC4D266&id=61EEC5828CC4D266%21306304&parId=61EEC5828CC4D266%21306333&o=OneUp
Then if I right-click your image and select "Copy Image Address", I get a different URL again:
https://am3pap003files.storage.live.com/y4mkekQgEZTA1704VWjJHitslT58O4r36wAYympVEqUaw3Dv5ceBGnM1JKxi8Xmd8xozlkAh626EeDD52rLElaz5QjmcXBsaQlWcZoe-5jjhybsVdABeWtata5eYQ7GYpguF4LVKF7NgktFkGKD4j3V2KVqncZ26GU16cmjaQTbcW98aI7ZSSY48KMoDGDaiAHzdaqf0nZaL3jutd1QmiDcTQ/P1150415.JPG?psid=1&width=805&height=804
Unfortunatly this image address URL seems to be too long to work with the IMAGE function.
Do you have access to any Sharepoint folders which you could use instead? These might result in shorter, usable image URLs.
In my case, the Sharepoint URL is formatted as follows:
https://mysharepointsite.sharepoint.com/sites/mypagename/myfoldername/mypicture.png
This IMAGE formula has changed my life by the way, it's fantastic !!! Hope you get it working.