Image Hosting

You need to host images and then provide a direct link to the image in your Google Sheet. You can generate horizontal or square image galleries for Messenger chatbots (No control over Instagram. It's square only.), but you'll need to host the images that will appear in your galleries and link to your images in your Google Sheet. There are three things you'll need to pay attention to for reliability and scalability.

Guidelines

  • Your images should be in JPEG (.jpg, or .jpeg file extension), or in PNG (.png file extension) format.
  • Image size and dimensions should be optimized so they load fast and reliably in Messenger.
  • Choose the right host to serve images reliably. There are both free and paid image hosting options.

Image Sizes

If your images are too small then the quality of the image displayed in Messenger will be poor, but if they are too large they may not load at all. You'll want to make sure your images are not only optimized to be the ideal dimensions, but also an acceptable file size. If you have images saved to your computer, you can always right click to get information on the image and see both the file size and dimensions.

Image Information

The optimal file size is less than 500 KB and the recommended dimensions for horizontal image galleries is 909x476 pixels, so they look good on almost any device (mobile and desktop). If you don't have images at the desired pixel size, you may lose some quality, but provide an image that is at least 500x262 pixels.

The recommended size for square images is 909x900 pixels, which makes your media appear flawless on almost any device (mobile and desktop). If you don't have images of this resolution, images which are at least 500x500 pixels are still acceptable, and most users won't notice a drop in image quality.

If you right-click on your image and get info, you can see the image dimensions and then make adjustments as necessary. In this example, the dimensions of the image may be too large. However, if the file size (KB) is acceptable, your images will still work. They just may not display exactly as you intend.

Image Information 2

Remember that if an image is too small then the image will be distorted in Messenger, but if it's too large the image may not load at all. File size is always the most important factor though in determining whether a gallery will load images. You may need to experiment, but every time your bot makes a request from a Google Sheet, the image in Messenger will update in real-time.


Adjusting Image Dimensions

If you need to crop your images to a target dimension, then we recommend picresize, a free online image editing tool, or you can use a default image editor on your computer, or the cropping tool in Adobe Photoshop.

Compressing Image Size

If you need to compress your images to a more reasonable file size, we recommend Tinypng. Tinypng will compress both PNG and JPEG file types. When you download your compressed images, you may need to rename your files so they match the file names in your Google Sheet.

Tinypng

You can upload and download images individually, or upload several images at once and then download a ZIP file with the compressed images.

Image Hosting

You'll need to host your images somewhere and then include a link to the hosted file in your Google Sheet.

Image Linking

There are a variety of image hosting options and while most are free, some image hosting methods can be more reliable than others. Your personal cloud host (i.e., Google Drive or Dropbox) can work for very low volumes because these were designed for your own media consumption and limited sharing to family and friends. There are web-based image hosting services which are free and support greater scale but are shared services between you and other community members of the service. Managing your own website and using that to host images is most reliable but usually comes with a cost.

Hosting Images With Imgur

Imgur is a web service built specifically for hosting images and offers better performance, capable of serving images at scale in social networks. Imgur is free though, and expectations should be that any free service may not be 100% reliable. To host your images with Imgur, you may want to create a free account so that you can easily access all of your images in the future. Click "New Post" to upload an image.

Imgur 1

Drag the image from your desktop to the upload window on Imgur.

Imgur 2

You don't need to give your post a title. Simply roll over the image and click the three dots to access the menu and click "Get share links".

Imgur 3

From the image sharing options, copy the link for BBCode to your clipboard because this link includes the file extension (png or jpg) for your image and you'll need to link directly to the file itself, not an Imgur page.

Imgur 4

Remove the "img" from the start and end of the URL so it's just a direct link to the image file. Paste the direct link to the hosted image file into your Google Sheet. The image file extension should be at the URL, with "https://" at the start of the link.

Hosting Images With imgBB

Much like Imgur, imgBB is a free web-based image hosting service. Select an image from your computer to upload and make sure "Don't autodelete" is selected before you upload. This will ensure your image is hosted indefinitely.

ImgBB 1

After you click upload, select the "BBCode full linked" option from the menu and you'll be given a code. You can copy the link to your clipboard, but there is data at the start and end of the link you'll want to remove so that all you have left is the direct link to the hosted image file.

ImgBB 2

Here is what the link will look like in your Google Sheet.

ImgBB 3

Hosting Images From Your Own Web Server

If you already have your own website then you're already hosting image files on a web server and you just need to add a direct link to the image file in your Google Sheet. GoDaddy and a range of other web hosting providers make it easy to host images but bill a small cost for monthly web hosting. Here you can see an image of a pizza is hosted in an "images" folder on a web server and using an FTP program the file was transferred from a computer to the web server.

FTP

Once the image is stored on the web server, you can type in the direct path to the image file in your web browser, copy the link paste the image in a Google Sheet.

FTP