How to Hotlink Animated GIF Files on the Cloud

Hotlink Animated GIFs From the Cloud, FixMyWP guide header image

Use Cloud Services for hotlinking your static files

Creating an Animated GIF presentation for my latest WooCommerce Plugin

Some time ago I published a new plugin, WooTabs, at CodeCanyon. WooTabs is a WooCommerce plugin that lets you add unlimited tabs to your product page. For example, you can create a Video tab or a Product Inquiry tab. That way you keep your visitors’ attention for a longer time while at the same time you decrease product page bounce rates and increase sales.

Even though the plugin title explains itself, I wanted to find a way to display visually how it worked. I created a YouTube Video showing WooTabs functionality but CodeCanyon didn’t allow embedding videos at the time, so I had to find another way to visualize my plugin functionality. Screenshots and images were out of the question too, because they would make the plugin page too long.

While taking a break from work I browsed my Google+ profile, where people in my circles often posted animated GIFs showing all kinds of strange, funny and weird stuff. It didn’t take long to come up with the idea of creating an animated GIF that would show how my WooTabs plugin worked. That way it could be embedded on my CodeCanyon sales page plus it was a nice way to join the GIF trend.

The first step was to capture a video that showed how WooTabs worked on both the front end and back end, keeping it under 50 seconds. Then I saved that video as .mp4 and used Free Video to Gif converter to convert it into an animated GIF. The next step was to upload it to my server and finally link it to my CodeCanyon sales page.

I followed the same steps for my other WooCommerce plugin, WooWaitlist, so in total I had two animated GIFs hotlinked from CodeCanyon to my server. This was fun and I experienced an increase in sales so I was very happy.

Need a hand with your WordPress site? Answer four quick questions and see your flat price before you pay. Start here →

Website bandwidth being sucked up by the animated GIF

That happy feeling didn’t last long. The next day I got a warning from my hosting panel that my website had used 80% of its monthly bandwidth limit. My CodeCanyon plugin pages receive hundreds of visits per day, so every visitor downloaded my animated GIFs from my server. This explained why my site consumed almost 10 GB of bandwidth in just 1 day, when in the past I only needed 4-5 GB per month. I had to find a solution fast, since extra bandwidth is expensive and it would reduce the revenue from selling my plugins.

Today the better fix is to avoid large GIFs altogether: convert them to MP4 or WebM video, which is usually a fraction of the size, and serve your static files through a CDN with good caching. If your site is slow or eating bandwidth, our speed optimization service can help.

How to Direct Link a file on the Cloud with Google Drive

Using Google Docs and Google Drive, I already knew that I could share files with other Google users, but I wasn’t sure if I could directly link (hotlink) my files. A way to direct link files in Google Drive would mean that I could upload my animated GIFs there and hotlink them to my CodeCanyon plugin pages, saving bandwidth.

After searching a bit I found a solution. You can read it below and use it as well.

First, upload the file you want to hotlink and share it as “Anyone with the link”. Then go and copy the share link that Google provides for the file. This should be something like:
https://drive.google.com/file/d/YOUR_FILE_ID/edit?usp=sharing
Copy “YOUR_FILE_ID” and paste it at the end of the following url replacing “YOUR_FILE_ID”:
https://drive.google.com/uc?export=download&id=YOUR_FILE_ID

This is the direct link to your file hosted in Google Drive. You can use it to download the file directly to your computer or hotlink it on your website or blog. Keep in mind that Google limits downloads of files that are shared very widely, so a busy hotlinked file can stop loading for a while.

How to Direct Link a Google Document

Google Docs

After you share a Google Doc you will get a share link like the one below:
https://docs.google.com/document/d/YOUR_FILE_ID/edit?usp=sharing

Once more copy “YOUR_FILE_ID” and paste it in the following url:
https://docs.google.com/document/d/YOUR_FILE_ID/export?format=docx for a Word document
https://docs.google.com/document/d/YOUR_FILE_ID/export?format=pdf for a PDF

Keep in mind that you can also use “txt”, “html” or “odt” for the download format.

Google Presentations

To hotlink a Google Presentation, share it publicly and copy “YOUR_FILE_ID” from the url below:
https://docs.google.com/presentation/d/YOUR_FILE_ID/edit?usp=sharing

and paste it in the following url(s):
https://docs.google.com/presentation/d/YOUR_FILE_ID/export/pptx if the presentation is in PowerPoint format
https://docs.google.com/presentation/d/YOUR_FILE_ID/export/pdf if the presentation is in PDF format

Google Spreadsheets

Share the spreadsheet publicly, then look at the share link and copy “YOUR_FILE_ID” from the following url:
https://docs.google.com/spreadsheets/d/FILE_ID/edit?usp=sharing

and paste it in the urls below:
https://docs.google.com/spreadsheets/d/FILE_ID/export?format=xlsx for Excel format
https://docs.google.com/spreadsheets/d/FILE_ID/export?format=pdf for PDF format

★★★★★
My site load times were slow and I needed FixMyWP to help me fix this. When they worked on the site, they learned that my server was the major problem with the slowness … Things are so much better.
Liana Roxanne Clark
eclecticjourneyphotography.com

In case you are curious what the animated GIF looks like:
WooTabs Intro

Need a hand with your WordPress site?

Answer four quick questions and see your flat price before you pay. Most fixes are done the same day or within 24 business hours.

Answer 4 quick questionsSee all prices

In this article

Need a hand with your site?

Answer four quick questions and see your flat price before you pay. Most fixes are done the same day or within 24 business hours.

Related articles