AdWords
6.1K members online now
6.1K members online now
Dive into advanced features like Remarketing, Flexible Bid Strategies, AdWords Editor, and AdWords Scripts
Guide Me
star_border
Reply

Why AdWords replacing <image> tags in SVG?

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I have made a few banners for Coca Cola with SVG soft masking and clip paths. When I uploaded to adWords all the ads fell apart. It turned out, the uploader converted my <image> tags to <img> which is.... bad. Beside this the program tried to close the <path> <maks> <clip-path> tags, without success. I think this part of the software needs serious bugfixing.

Best Regards,
Oliver

1 Expert replyverified_user

Why AdWords replacing &lt;image&gt; tags in SVG?

Community Manager
# 2
Community Manager

Hi Oliver,

 

Thanks for posting to the Community. I'm sorry to hear that the image upload did not work successfully.

 

I'd like to share this feedback with our product team so that they can investigate. Can you please share more specific steps you took leading up to this so that the team can try to recreate this?

 

Cassie

Re: Why AdWords replacing &lt;image&gt; tags in SVG?

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

 Hi Cassie,

Thanks for Your answer. 

Here is the code I wrote:

<svg id = 's' width = 300 height = 250 viewBox = '0 0 300 250' xmlns = 'http://www.w3.org/2000/svg' class = Asset >
  <rect id = 'back' x = -23 y = -1 width = 344 height = 125 fill = 'rgb( 239, 239, 239 )' />
  <g id = 'PICBG' layout = '156 0 97 110' >
    <rect id = 'b1' x = 99 y = 9 width = 97 height = 94 fill = 'rgb( 229, 229, 229 )' />
    <rect id = 'flow' x = 145 y = 31 width = 4 height = 41 fill = 'rgb( 0, 0, 0 )' />
    <rect id = 'flow2' x = 145 y = 31 width = 4 height = 41 fill = 'rgb( 0, 0, 0 )' />
    <path id = 'b4' transform ='scale(.1)' layout = '141 24 13 8' fill = 'rgb( 210, 210, 210 )' d = 'm1415,242h120v25c0,28 -22,50 -50,50h-20c-28,0 -50,-22 -50,-50v-25z' />
    <path id = 'b3' transform ='scale(.1)' layout = '130 13 35 13' fill = 'rgb( 170, 170, 170 )' d = 'm1300,137h350v65c0,28 -22,50 -50,50h-250c-28,0 -50,-22 -50,-50v-65z' />
    <path id = 'b2' transform ='scale(.1)' layout = '99 -7 97 22' fill = 'rgb( 98, 98, 98 )' d = 'm990,-68h970v115c0,55 -45,100 -100,100h-770c-55,0 -100,-45 -100,-100v-115z' />
  </g>
<g id = 'SLIDER' layout = '0 57 354 114' >
  <image id = 'poharReflect' x = -33 y = 72 width = 29 height = 77 />
  <image id = 'pohar1' x = 27 y = 72 width = 29 height = 77 />
  <image id = 'pohar2' x = 87 y = 72 width = 29 height = 77 />



And here is what it becoming after uploading to adWords as an image ad:

<svg class=Asset height=250 id=s viewBox="0 0 300 250" width=300 xmlns="http://www.w3.org/2000/svg">
  <rect fill="rgb( 239, 239, 239 )" height=125 id=back width=344 x="-23" y="-1">
  <g id=PICBG layout="156 0 97 110">
    <rect fill="rgb( 229, 229, 229 )" height=94 id=b1 width=97 x=99 y=9>
    <rect fill="rgb( 0, 0, 0 )" height=41 id=flow width=4 x=145 y=31>
    <rect fill="rgb( 0, 0, 0 )" height=41 id=flow2 width=4 x=145 y=31>
    <path d="m1415,242h120v25c0,28 -22,50 -50,50h-20c-28,0 -50,-22 -50,-50v-25z" fill="rgb( 210, 210, 210 )" id=b4 layout="141 24 13 8" transform="scale(.1)">
    <path d="m1300,137h350v65c0,28 -22,50 -50,50h-250c-28,0 -50,-22 -50,-50v-65z" fill="rgb( 170, 170, 170 )" id=b3 layout="130 13 35 13" transform="scale(.1)">
    <path d="m990,-68h970v115c0,55 -45,100 -100,100h-770c-55,0 -100,-45 -100,-100v-115z" fill="rgb( 98, 98, 98 )" id=b2 layout="99 -7 97 22" transform="scale(.1)">
    </path></path></path></rect></rect></rect></g>
  <g id=SLIDER layout="0 57 354 114">
    <Img height=77 id=poharReflect width=29 x="-33" y=72>
    <Img height=77 id=pohar1 width=29 x=27 y=72>
    <Img height=77 id=pohar2 width=29 x=87 y=72>


As You can see:

All the <image> tags are becoming <Img> tags, which is a standard HTML DOM tag, not an SVG one. This causing the pixel asset's disappearance.

All the self closed <rect> and <path> tags got closed but not in the right place, which causing the layout to fall apart.

I have a workaround now which costed me a full work day to develop and not to mention the panic caused by the campaign falling apart one day prior deadline. 

Let me know I You need the actual .zip of the ad.

Thaks for Your help. I am sure this is trivial bug in the uploader/converter script, which can be fixed in an hour.

Oliver

Why AdWords replacing &lt;image&gt; tags in SVG?

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭

Hi Cassie,

 

Have you contacted with Adwords product team on this <image> tag replacing issue?

When are they going to fix this bug?

 

Cheers

Vitaliy

Why AdWords replacing &lt;image&gt; tags in SVG?

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

I'm facing the same issue with svg image tag replaced by DOM <img> tag..is there any fix for this ?

Why AdWords replacing &lt;image&gt; tags in SVG?

[ Edited ]
Visitor ✭ ✭ ✭
# 6
Visitor ✭ ✭ ✭

Hi Cassie, I'm prepping banner files for an upcoming campaign. Have the SVG issues mentioned in this thread (and several others) been fixed by the AdWords product team?

 

1) The uploader incorrectly converts SVG <image> tags to HTML <img> tags.

 

2) The uploader incorrectly dealing with shorthand tag closing.

This:

<rect width="300" height="250" />

<rect width="300" height="250" />

 

Incorrectly becomes this after uploading:

<rect width="300" height="250"> 

<rect width="300" height="250">

</rect>

</rect>

 

Thank you.