How to use Google Drive as a CDN (Content Delivery Network)

SixFive
15 Mar 202208:15

Summary

TLDRIn this video, the creator addresses a viewer's question on how to properly add an image from Google Drive to a Gmail signature. They explain why images might not appear when using a shared Google Drive link and offer a solution by modifying the URL. The tutorial demonstrates how to extract the unique file identifier from Google Drive and format the URL correctly to make the image display without extra Google Drive wrappers. Additionally, the video covers creating and embedding the HTML image tag needed for email signatures. The video concludes with a successful image insertion into a Gmail signature.

Takeaways

  • πŸ˜€ The video is in response to a question from a viewer named Joanne about adding images to Gmail signatures using Google Drive.
  • πŸ“ Joanne created her signature in Procreate, uploaded it to Google Drive, but encountered issues with the image not displaying in her Gmail signature.
  • πŸ’» The issue arises when using the 'Insert image' feature in Gmail and selecting the 'Web address URL' option; the image does not show due to incorrect permissions and URL structure.
  • πŸ”— To fix this, it's necessary to set Google Drive sharing permissions to 'Anyone with a link' and then modify the image URL to remove unnecessary parts.
  • πŸ›  The correct URL format requires extracting the file ID from the original Google Drive link and using a custom URL: 'drive.google.com/uc?export=view&id=FILE_ID'.
  • 🌐 This URL format displays the image directly without any Google Drive interface or wrapper.
  • πŸ–Ό The next step is embedding the modified URL into an HTML image tag, which can be used in the Gmail signature.
  • πŸ”§ The video demonstrates troubleshooting issues with HTML quotes and ensuring the correct formatting for the image to display properly.
  • πŸ“§ After applying the corrected URL and HTML image tag in the Gmail signature editor, the image displays successfully in email previews.
  • πŸ‘ The video concludes by encouraging viewers to like and subscribe for more helpful tutorials.

Q & A

  • What is the video about?

    -The video addresses a question from a viewer about how to correctly insert an image from Google Drive into a Gmail signature, resolving issues related to image visibility.

  • What problem did the viewer Joanne face with her Gmail signature image?

    -Joanne uploaded an image to Google Drive and tried to insert it into her Gmail signature using a web address. However, the image did not show up until she set sharing permissions to 'anyone can edit', but even after this, the image still didn't appear in the signature.

  • What is the reason why the Google Drive image link doesn't work directly in the Gmail signature?

    -The default Google Drive URL includes a view wrapper, which prevents the image from being displayed directly in Gmail signatures. The wrapper adds extra elements like the Google Drive interface, making the image unusable in this context.

  • How can you modify the Google Drive URL to make the image work in a Gmail signature?

    -You need to change the URL to bypass the Google Drive interface. This can be done by using the file's unique identifier and constructing a new URL with the format: `drive.google.com/uc?export=view&id=FILE_ID`, replacing 'FILE_ID' with the image's unique identifier.

  • Why is the 'export=view' parameter important in the new URL?

    -The 'export=view' parameter instructs Google Drive to serve only the image without the Google Drive interface, which makes it suitable for embedding in a Gmail signature.

  • How do you find the unique file identifier in a Google Drive link?

    -The file identifier is found between the slashes in the original Google Drive link, typically after '/file/' and before '/view'. This string of characters is unique to the file and is used to reference it in the new URL.

  • What HTML tag can be used to embed the Google Drive image in an HTML file?

    -The image can be embedded using the HTML `<img>` tag, where the 'src' attribute contains the modified Google Drive URL. For example: `<img src='drive.google.com/uc?export=view&id=FILE_ID' alt='Image description'/>`.

  • What common issue might arise when copying HTML code for the signature, and how can it be fixed?

    -If the quotes around the URL are incorrectly encoded, the HTML may not render properly. This can be fixed by ensuring the quotes are standard double quotes ('"') instead of special characters used by some text editors.

  • What final step is necessary to confirm the image works in a Gmail signature?

    -After constructing the correct URL and inserting it into the Gmail signature editor, you should verify that the image displays correctly in the signature preview and in a test email.

  • Why is it important to understand the construction of the image URL for Google Drive?

    -Understanding how the URL works allows you to control how the image is displayed and avoid issues with permissions or the Google Drive interface, ensuring the image appears as intended in your signature.

Outlines

00:00

πŸ’‘ Responding to a Viewer’s Question on Gmail Signatures

The video begins with a response to a viewer, Joanne Amantia, who raised a question regarding image insertion in Gmail signatures. Joanne encountered issues when trying to insert an image from Google Drive into her Gmail signature. Specifically, the image did not display properly until the sharing permissions were changed, but it still failed to show in the signature settings. The presenter acknowledges this problem and sets the stage for addressing how to correctly embed an image from Google Drive into Gmail signatures using a specific URL configuration.

05:00

πŸ–ΌοΈ Setting Up and Testing an Image from Google Drive

The presenter explains how to prepare an image for use in a Gmail signature by first uploading it to Google Drive. A simple placeholder image is used as an example. After setting the sharing permissions in Google Drive to 'anyone with the link,' the presenter demonstrates how copying the URL and inserting it into Gmail using the 'web address' option still results in the image not being displayed properly. The issue stems from how Google Drive serves images, prompting the need for a more specific URL setup to bypass the image wrapper that causes the display problem.

πŸ”§ Adjusting the URL for Proper Image Display

To resolve the issue, the presenter explains the need to modify the Google Drive URL. Instead of using the default link format that includes 'view?usp=sharing,' the correct approach is to extract the file ID from the URL and construct a new link. This modified URL should include 'uc?export=view&id=' followed by the file ID. This ensures that the image is served directly, without the wrapper. The presenter tests this new URL by pasting it into a browser, which now displays only the image without any surrounding interface, confirming the solution works.

πŸ“„ Embedding the Image into HTML and Troubleshooting

The presenter moves on to demonstrate how to embed the image using HTML. They create an HTML image tag with the updated Google Drive URL and an alt tag, 'My Business Logo.' After copying this HTML code into a file and opening it in a browser, the image initially does not display due to incorrect encoding of the quotation marks. Once the quotation marks are corrected, the HTML file successfully displays only the image, proving the code works as intended. This method can be used to create a working HTML signature manually.

βœ… Successfully Adding the Image to Gmail Signature

In the final steps, the presenter demonstrates how to use the newly constructed URL in Gmail's signature editor. They delete the old image and insert the new URL into the 'web address' option. This time, the image correctly appears in the signature preview. The solution is confirmed as successful, meaning that the image will now display correctly in outgoing emails. The presenter concludes by thanking Joanne for the question and encourages viewers to like and subscribe.

Mindmap

Keywords

πŸ’‘Google Drive

Google Drive is a cloud storage service where users can upload and share files. In the video, the speaker discusses how to host images for Gmail signatures using Google Drive. Joanne, a viewer, uploaded her signature image to Google Drive but faced issues displaying it in her Gmail signature.

πŸ’‘Gmail Signature

A Gmail signature is a personalized block of text, images, or links added automatically at the end of emails. The video focuses on adding an image from Google Drive to a Gmail signature, which was not showing up correctly for a user named Joanne due to permissions issues.

πŸ’‘Image URL

An image URL is a web address used to link directly to an image file. In the video, the speaker explains how the URL generated by Google Drive for an image has additional elements, like 'view usp sharing', that need to be modified in order to display the image correctly in a Gmail signature.

πŸ’‘File Identifier

A file identifier is a unique string of characters assigned to a file in Google Drive, used to locate and access the file. The video explains that this file ID is necessary for constructing a proper URL to display the image outside Google Drive's web interface, enabling its use in email signatures.

πŸ’‘Sharing Permissions

Sharing permissions control who can view or edit files stored in Google Drive. In the video, Joanne initially sets her image file's permissions to 'anyone can edit', but this does not resolve the issue. The speaker suggests using a specific URL configuration to display the image instead of relying on sharing permissions.

πŸ’‘HTML Image Tag

The HTML image tag ('<img>') is used to embed images in web pages and email signatures. The speaker demonstrates how to manually create an image tag with the correct Google Drive URL to ensure that the image appears properly in the Gmail signature.

πŸ’‘Export View

The 'export=view' parameter is part of the modified Google Drive URL that allows the image to be served directly without the Google Drive interface. The speaker shows how adding this parameter to the URL ensures that the image can be embedded in a Gmail signature without issues.

πŸ’‘Web Interface

A web interface is the user-facing part of a web service, like Google Drive, that includes navigation and tools. In the video, the speaker points out that the default Google Drive URL displays an image within this interface, which is why the image does not show correctly in Gmail signatures.

πŸ’‘Procreate

Procreate is a digital illustration app for creating graphics, such as logos and signatures. Joanne used Procreate to design her signature and uploaded it to Google Drive. The video addresses how to correctly embed that image in a Gmail signature.

πŸ’‘Signature Editor

The signature editor is a tool within Gmail settings that allows users to create and customize their email signatures. In the video, the speaker walks through the process of embedding a Google Drive-hosted image in the signature editor using a properly formatted URL.

Highlights

Introduction of video response to a viewer's question on adding images to Gmail signatures.

Viewer question about creating a signature in Procreate, uploading it to Google Drive, and facing issues with image display.

The issue occurs because the image doesn’t display unless sharing permissions are set to 'anyone can edit'.

Explanation of why Google Drive's default link for images includes a wrapper interface, preventing direct image display.

Solution requires modifying the URL to bypass Google Drive’s interface and directly display the image.

The critical part of the URL is the unique file ID, which needs to be extracted and modified to serve the image directly.

Construct a new URL using 'drive.google.com/uc?export=view&id=' followed by the unique file ID to display the image correctly.

When the correct URL is used, the image displays without any wrapper or additional interface elements.

Demonstration of how to take the correct URL and embed it into an HTML image tag for use in an email signature.

Overview of the HTML image tag structure, including the correct URL format and the 'alt' attribute for accessibility.

Caution against using incorrect double quotes in HTML code, as this can cause issues with displaying the image.

HTML code corrections are made to ensure the signature displays properly in web browsers.

Testing the modified HTML file shows that the image is displayed correctly without additional interface elements.

Final step of adding the correct URL to the Gmail signature editor, confirming the image now displays as intended.

Conclusion with a recap of the solution, hoping the viewer's question is answered, and a call to like and subscribe.

Transcripts

play00:00

hello youtube hi guys uh this video is

play00:03

in response to a comment from one of our

play00:06

viewers joanne amatina

play00:10

amantella

play00:12

joanne amantia

play00:14

sorry if i'm getting that wrong um and

play00:17

in response to

play00:18

our video about how do we add images to

play00:21

our gmail signatures now if you don't

play00:24

have a website for whatever reason and

play00:25

that's okay

play00:27

you might need to use something like

play00:28

google drive to serve those images and

play00:31

so joanne asks one of the things we

play00:32

don't address is if someone saved their

play00:34

signature file to their google drive i

play00:37

created my signature in procreate and

play00:39

uploaded the jpeg file to my google

play00:41

drive i selected the insert a photo icon

play00:43

in settings and selected web addresses

play00:45

per the directions the image did not

play00:47

show until i set the sharing permissions

play00:49

to this file anyone can edit it when i

play00:51

went back to my signature settings the

play00:53

image did not show now that's the bit

play00:56

that we're going to address in this

play00:57

video i'm going to show you how to take

play00:58

an image that you've got in your google

play01:00

drive and actually make it work when

play01:03

you're using an email signature okay

play01:06

and again this is very specific you have

play01:08

to have a particular

play01:10

configuration for the url or for the and

play01:12

the address path to the image all right

play01:15

so let's start with the simple bits okay

play01:18

and joanne thanks very much for the

play01:20

question let's get into it

play01:23

so the first thing is we need an image

play01:25

inside of our google drive now i've got

play01:28

just a very simple placeholder it's 250

play01:31

pixels

play01:32

and

play01:34

that is my

play01:35

my image that i'm going to use in this

play01:38

presentation

play01:39

now in my gmail signature i'm going to

play01:42

create a new signature and i'm going to

play01:44

do

play01:48

i'm going to do one called demo of

play01:50

google drive images okay so there it is

play01:52

now

play01:53

as joanne points out if you sort of do

play01:56

it insert image and you just copy this

play01:58

one

play01:59

or let's actually do this let's go on to

play02:02

share

play02:05

and let's change the restriction on how

play02:08

this is

play02:10

set up to go anyone with a link

play02:12

all right that's good now we'll copy

play02:14

that link click on done

play02:16

and if i go over here and i go web

play02:18

address url which is how i want to

play02:20

include it i'm going to click that

play02:22

it appears to show in here

play02:24

then i'll click select

play02:26

but i get this little icon down here

play02:29

that says well actually no i can't show

play02:31

that at all it's not going to work all

play02:32

right so there's our problem that's what

play02:34

we're going to try and resolve today

play02:37

so the way this works is

play02:39

we have to tell google drive to serve

play02:41

that image directly and if i take that

play02:43

same url and i just paste that straight

play02:46

in here

play02:47

it's going to give me this interface

play02:49

right which has got this wrapper and

play02:51

stuff around it so that's why this image

play02:53

isn't showing so we need to change this

play02:54

so that actually what happens is we just

play02:56

get this image being displayed

play03:00

okay so let's look at why that is so

play03:01

we've got our correct file path

play03:04

that is the one that we've just copied

play03:06

from google drive okay and that looks

play03:08

like this it says drive.google.com

play03:11

file

play03:12

and then some garbage and then view usp

play03:15

sharing okay so this last little bit the

play03:18

view usp sharing is telling it to use

play03:20

that interface with the wrapper and

play03:22

stuff around it

play03:23

now the important bit to this

play03:25

is actually the bit between these

play03:28

slashes so the slash view usb sharing we

play03:31

can ignore but if we go back and we get

play03:33

the bit of garbage that we need now that

play03:35

that's the file identifier and it's

play03:37

unique to your file in your google drive

play03:39

account

play03:40

across google drive everywhere all right

play03:43

so that's the bit we're going to

play03:44

concentrate on so we're going to copy

play03:45

that bit out

play03:47

and we're going to construct a new url

play03:49

okay now that new url looks like this it

play03:52

says drive.google.com uc question mark

play03:55

export equals view now this bit here

play03:57

this export v equals view is really

play03:59

important because that now tells google

play04:01

drive

play04:02

instead of wrapping it in that sort of

play04:04

interface we just want to view we don't

play04:07

want to do anything else we just want to

play04:08

view it then we've got and id equals and

play04:11

then our unique identifier okay so now

play04:14

that is going to display our image okay

play04:19

so now if i take that url and i paste it

play04:22

now into a new window and i click go

play04:25

instead of all of those you see how

play04:27

there's no items in the corners and i

play04:30

can actually grab hold of that image and

play04:32

see it

play04:33

if i inspect the page here the only

play04:36

thing on the page is that image right

play04:38

see there's a body tag and then there's

play04:39

this image that's it there's nothing

play04:41

else there so this is perfect that's

play04:43

exactly what we want to we want to have

play04:45

all right so coming back to our

play04:47

um process what do we need to do so we

play04:50

need to take our

play04:52

file id and put it into a new url so

play04:54

that's our export view and then we need

play04:56

to embed it into an image html image tag

play05:00

okay now

play05:01

when you're using the signature builder

play05:03

directly you don't need to know this bit

play05:04

but it's good knowledge so this is an

play05:06

html image tag and the first bit is

play05:08

image source image src equals

play05:11

apologies for the wrapping that's just

play05:13

the way the slide is working in google

play05:15

slides

play05:17

and then we've got our url that we've

play05:18

built so that's the one we just tested

play05:20

and we paste it into the browser that

play05:21

gives us just the image on the page and

play05:24

you can see that's encompassed in double

play05:26

quotes here and here and then we've just

play05:28

got an alt tag my business logo so

play05:31

that's this bit here alt my business

play05:33

logo okay

play05:34

now if we were to take that image tag

play05:36

put it into an html file and and open

play05:39

that html file

play05:40

if as if we were building our html

play05:42

signature ourselves then this would now

play05:45

display that so i've got a little html

play05:47

file here and you can see i've just

play05:49

started my html source

play05:51

so i'm going to do is now just copy that

play05:54

and put that into

play05:56

into my html file okay and i'm going to

play05:58

save this and we'll open it up

play06:05

[Music]

play06:11

okay cool so now i've got this file it's

play06:13

called signature demo so we're going to

play06:14

open that up on the in a web browser and

play06:16

see what it does

play06:22

okay here we go so uh what's happened

play06:25

there all right so that the reason that

play06:27

that's not worked is because these

play06:28

little double quotes and stuff are

play06:30

actually

play06:31

um coming out incorrectly

play06:34

they are the wrong

play06:35

uh html quotes so i'm just gonna have to

play06:37

replace all of these just give me one

play06:39

sec

play06:42

okay so now i've got my html signature

play06:45

demo document i've corrected those

play06:47

quotes there's a difference they might

play06:49

look the same but they are different the

play06:51

way they're encoded

play06:52

and now if i refresh my html file i get

play06:56

nothing but that image on there okay

play06:59

so that's what this image tag here does

play07:02

with double quotes and our file id okay

play07:06

so now we've got that file we can go and

play07:08

try that in our signature editor

play07:11

so coming back to my signature what i'll

play07:13

do is i'll just delete this one out of

play07:14

here and then i'm going to click on

play07:18

insert image again

play07:20

use the web address url

play07:22

and then paste my new image into here

play07:24

now we're going to get much the same

play07:25

thing it's still going to show in here

play07:28

but this time when i click select it's

play07:30

now going to appear in my uh

play07:33

preview

play07:34

for

play07:35

the signature okay and now that means

play07:37

when i go and create an email and this

play07:40

signature is applied to it it's now

play07:42

going to work and joanna hopefully that

play07:45

answers your question if you like this

play07:47

video please

play07:48

like and subscribe and we'll see you in

play07:50

the next one

play08:14

you

Rate This
β˜…
β˜…
β˜…
β˜…
β˜…

5.0 / 5 (0 votes)

Related Tags
Gmail SignaturesGoogle DriveEmail TipsImage EmbeddingProcreateSignature SetupTech GuideHTML TipsURL FixFile Sharing