Today I Learned
Extract file id from drive shareable link
I host my blog images on Google Drive sometimes, the normal shareable link is not the actual image source. Instead this is :<INSERT-ID>
INSERT_ID is the file id (in the shareable link)which is higlighted below
here is a bash script to convert the link.
#!/usr/bin/env bash
# remove everything after the last /
# get everything after the last /
echo "$get_last"
You can now use it in <img> src
Copy link
Edit on GitHub