I want to show an image from Google Drive in a Google Spreadsheet. 
I have to replace the text: 
         open?
for: 
         uc?export=download&
in the Shareable link:
         https://drive.google.com/open?id=0BwJUnx7uETDmaG42eGdEVUVocU0
I have tried this solution https://stackoverflow.com/a/42819032/2661411:
" I made a two lines script to use the share link of an image in Google Drive.
- Go to Tools > Script editor.
 - Copy, paste the following code
 Click on run for permission
function DRIVE_IMAGE(link){ prefix_url = "https://docs.google.com/uc?export=download&"; link.replace("open?", "uc?export=download&"); }
Using the script :
- Copy the share link of your image in Google Drive.
 - Go to a cell
 - Enter the formula 
=IMAGE(DRIVE_IMAGE("COPIED_LINK"))" 
But didn't work for me, it said:
TypeError: Cannot call method "replace" of undefined. (line 3, file "ImgView")
Any ideas? I would like it to keep it simple.