How to create compliant product images for Google Shopping

On this page you will find the details of how the Image Editing APIarrow-up-right enables you to edit your product images to make them compliant with the guidelines of Google Shopping.

Introduction

If you’re running an e-commerce website or managing digital advertising campaigns for customers, you already know how important it is to have great-looking images of your products.

But if you want to list your products on Google Shopping, you must deal with an additional constraint: you’ll have to comply with the platform’s guidelines.

More specifically, Google Shopping expects your product images toarrow-up-right:

  1. show the product over a white background

  2. have a square aspect-ratio, with at least 800 pixels per side

  3. have the product occupy between 75% and 90% of the image

So let's go over how these guidelines can be implemented using the Image Editing API.

Implementation

Square Aspect-Ratio

Let's start by making sure the result image has a square aspect ratio.

We can configure the resolution of the result image through the parameter outputSize.

Here we need a square aspect-ratio, so we can set its value to, for example, 2000x2000.

White Background

By default, the Image Editing API will remove the background of the input image, so there's no need to set a specific argument for it to happen.

However, we do need to specify that we want to result image to be on a white background.

To achieve this, we'll use the parameter background.color which allows us to replace the background with a solid color and set its value to white.

Padding

Finally, we need to configure the positionning of the product, so that it occupies between 75% and 90% of the result image.

For this, we'll set the parameter padding to a value between 10% and 25%.

circle-info

By default, padding will be ignored when a side of a product is cropped.

If needed, this behavior can be disabled by setting the parameter ignorePaddingAndSnapOnCroppedSides to false.

Results

Using the parameters outputSize, background.color and padding we're now ready to automatically edit product images to make them compliant with the guidelines of Google Shopping.

Here's a before/after of the results:

(original image)

(edited image)

If you want to reproduce these results, here's the exact API call that was used to edit the images:

Conclusion

The Image Editing API allows you to easily create product images that are compliant with the guidelines of Google Shopping.

This tutorial we took the example of Google Shopping, but you can of course also use the Image Editing API to create compliant images for other advertising networks, such as Amazon Advertisingarrow-up-right or Meta (Facebook/Instagram) Shoppingarrow-up-right.

If you want to learn more, here's the details of the API features used in this tutorial:

Last updated

Was this helpful?