Google Drive Image URL Generator creates direct image URLs from your images stored on Google Drive, ready for seamless integration into websites or projects. You can generate also thumbnail links instantly, with optional alt text for accessibility.
The code was updated on December 4, 2024, to accommodate changes in Google Drive links. For more details, see the "How does it work" section.
Generate Image URL that directly displays the image.
Thumbnail URL with Custom Size: Create thumbnail links with adjustable width and height.
Alt Text: Add descriptive alt text for accessibility and SEO.
Ensure your Google Drive image visibility is set to "Anyone with the link." Without this setting, generated images will not be accessible by URLs.
This tool is designed to work with image files stored in Google Drive. Other file types (documents, videos, etc.) are not supported.
Generated URLs are optimized for embedding in websites, applications, or sharing publicly.
For custom thumbnails, specify your desired image dimensions (width x height) to adjust the image size in the output URL.
Alt text is essential for accessibility and should be included in HTML versions for screen readers.
Step 1: Upload Image to Google Drive.
If the image is not already in Google Drive, upload it by clicking on the "+ New" button in Google Drive and selecting "File upload". Choose the image from your device.
Step 2: Share the Image
After uploading, right-click on the image file and select "Share". A sharing dialog will appear. Click "Copy link" to get the sharing URL.
Step 3: Adjust Sharing Settings and Copy link
Ensure the sharing settings are set to "Anyone with the link". By default, files in Google Drive are private. Adjust the sharing permissions so that anyone with the link can view the image.
The Google Drive Image URL Generator simplifies the process of converting Google Drive links into usable image URLs.
The original Google Drive link, such as:
https://drive.google.com/file/d/1p6H6BNwufh7svA2RxnHBz1bqZPaZ4BMJ/view?usp=sharing
Is transformed into a direct image URL:
https://lh3.googleusercontent.com/d/1p6H6BNwufh7svA2RxnHBz1bqZPaZ4BMJ
If the original link contains a resourcekey parameter, such as:
https://drive.google.com/file/d/1p6H6BNwufh7svA2RxnHBz1bqZPaZ4BMJ/view?usp=sharing&resourcekey=0-9JwFZ4R4-T1RHGipe3iUzQ
The resulting direct image URL includes it:
https://lh3.googleusercontent.com/d/1p6H6BNwufh7svA2RxnHBz1bqZPaZ4BMJ?resourcekey=0-9JwFZ4R4-T1RHGipe3iUzQ
You can use these direct image URLs in web projects, applications, or wherever you need to display the image.
The original Google Drive link can also be converted into a thumbnail link with adjustable dimensions.
For example, the link:
https://drive.google.com/file/d/1p6H6BNwufh7svA2RxnHBz1bqZPaZ4BMJ/view?usp=sharing
With a specified width and height, such as 600x600, becomes:
https://lh3.googleusercontent.com/d/1p6H6BNwufh7svA2RxnHBz1bqZPaZ4BMJ=w600-h600
If a resourcekey is included in the original link, such as:
https://drive.google.com/file/d/1p6H6BNwufh7svA2RxnHBz1bqZPaZ4BMJ/view?usp=sharing&resourcekey=0-9JwFZ4R4-T1RHGipe3iUzQ
The thumbnail URL includes it:
https://lh3.googleusercontent.com/d/1p6H6BNwufh7svA2RxnHBz1bqZPaZ4BMJ=w600-h600?resourcekey=0-9JwFZ4R4-T1RHGipe3iUzQ
Use these thumbnail links to display resized versions of the image in your websites, blogs, or applications. The width and height are customizable to fit your design needs.
Image Not Displaying
Ensure the file’s visibility is set to "Anyone with the link". Without this setting, the URL will not work for external viewers.
Incorrect File Type
This tool only supports image files (JPEG, PNG, etc.). Links to non-image files (documents, videos, etc.) will not generate a usable image URL.
Broken Thumbnail Links
Make sure the width and height specified for thumbnails are valid. Invalid or excessively large dimensions may result in the image not loading properly.
1. Why can’t I access the image after generating the URL?
Verify that the file’s sharing permissions in Google Drive are set to "Anyone with the link".
2. How do I adjust the size of a thumbnail?
In the thumbnail link, you can customize the size by specifying the width and height. For example, sz=w300-h300 will resize the thumbnail to 300x300 pixels.
3. Can I use the image URL in my blog or website?
Yes, the generated URLs are perfect for embedding images in blogs, websites, and applications.