Image Ad Upload Gives a Blank Image

566 views
Skip to first unread message

testa...@geeks.ltd.uk

unread,
Oct 8, 2014, 7:12:23 AM10/8/14
to adwor...@googlegroups.com
When I upload some image ads to AdWords using the AdWords API, the upload is successful, and the API manages to recognise when the images are not of the correct size. Beneath the file name in the relevant AdGroup, there is a string 'A x B' indicating the dimensions of the image. However, when I click on the image for a preview, I only see a small popup, blank but for the word 'Preview' and an X to close the window.

Why is this happening? I am uploading the images as part of the ImageAd itself, using only AdGroupAdService.mutate method. Do the images have to be uploaded separately? If so, how do I link the images to the relevant image ads? Or is there something else I am missing? I am happy to give further details on request.

Thank you for your help in this matter.

Best wishes,
Conor

testa...@geeks.ltd.uk

unread,
Oct 8, 2014, 9:16:25 AM10/8/14
to adwor...@googlegroups.com
I guess I am additionally asking if I should be able to preview the relevant ad after uploading it. Could there be a reason other than the image file being empty (which seems unlikely given that there are dimensions beneath the image name, and that the mutate method fails if the images on my local machine aren't of the right size) for the preview not displaying anything?

Thanks,
Conor

Josh Radcliff (AdWords API Team)

unread,
Oct 18, 2014, 11:16:31 AM10/18/14
to adwor...@googlegroups.com
Hi Conor,

I just ran a quick test where I created an ImageAd by specifying the following attributes:
  • name
  • url
  • displayUrl
  • image: an Image object with:
    • data (set to the bytes of the image)
After the ADD operation, I was able to preview the image (no blanks for me). Note that you do not need to upload the image separately (and actually, you cannot do this).

Have you tried just specifying the data attribute of the Image? The API should figure out the dimensions from the data. I'm thinking the issue for you might be that the dimensions don't match the data specified on the Image, and perhaps that's causing the preview problems.

By the way, if you haven't found it already, look for the Media or MediaUtils in the AdWords API client library you're using -- it has utility methods for constructing the data byte array from a file or URL (e.g., the Java utility is here on github).

If you try just specifying the data of the Image and it's still not working, could you pass along the AdGroup ID and Ad ID so I can investigate further?

Thanks,
Josh, AdWords API Team
Reply all
Reply to author
Forward
0 new messages