Replacing image URL text to image filles in Google Docs

141 views
Skip to first unread message

A Ali

unread,
Jul 16, 2023, 9:31:24 PM7/16/23
to Google Apps Script Community
Hi,

I am currently working on a large document I have a problem I really need some help with. To simplify the matter the document I have been given has links to images as signatures and I need to change each of them to an image. I have tried many scripts from GitHub to Stack overflow without success. 

google screen 2.png

This is just a sample image used on the word press site. Can I use a script that will help me to replace the URL text to that specific image from URL in Google Docs?

Any help with be really appreciated.

Thank you for reading.

cwl...@gmail.com

unread,
Jul 17, 2023, 8:57:47 AM7/17/23
to Google Apps Script Community
How many images are you having to work with?

There are many different things going on here that you will have to account for. 
-making sure the script can recognize each url as a link
-get the location within the document where the url is (create a bookmark?)
-copying the url text
-using the url text to actually fetch the image it points to (including making sure the script has permissions to access the site where the image is located)
-inserting the image at the proper location within the document
-ensuring the image is the proper size that you want, and the text around it is flowing properly

etc etc

Reply all
Reply to author
Forward
0 new messages