Error images
-
The attribute ‘src’ in tag ‘IMG-I-AMPHTML-INTRINSIC-SIZER’ is set to the invalid value ‘data:image/svg+xml;charset=utf-8,<svg height=”704″ width=”500″ xmlns=”http://www.w3.org/2000/svg” version=”1.1″>’.UNKNOWN
line 39, column 2650
-
Thank you. It is due to the last update. I did a rollback, my theme is not ready yet for this latest version. I close the ticket.
Thank you@escael Where did you see the above error? Was that in the AMP validator?
I would love to get more contextual information to see if this is a bug we need to fix.
He was activating the plugin and seeing an output. For example:
https://www.isliada.org/libros/akira/amp/
When activating the new version, the error was caused by that image.-
This reply was modified 6 years, 1 month ago by
escael.
Hello, I have done tests again and I continue with the problem. I enclose the errors that the validator gives me. I cannot leave the site with this error because the positioning would affect me.
What you can do to help, count on me.
Thank you.El atributo “src” de la etiqueta “IMG-I-AMPHTML-INTRINSIC-SIZER” se ha establecido con el valor “data:image/svg+xml;charset=utf-8,<svg height=”499″ width=”500″ xmlns=”http://www.w3.org/2000/svg” version=”1.1″>”, que no es válido.
Image
“></i-amphtml-sizer><noscript>
</noscript></amp-img>Same image, before update plugin
<amp-img width=500 height=499 src=https://cdn.isliada.org/static/images/2020/03/crimen-y-castigo-500×499.jpg class=”attachment-large size-large wp-post-image amp-wp-enforced-sizes” alt=”La vida breve de la sucesora de Enigma” srcset=”https://cdn.isliada.org/static/images/2020/03/crimen-y-castigo-500×499.jpg 500w, https://cdn.isliada.org/static/images/2020/03/crimen-y-castigo-180×180.jpg 180w, https://cdn.isliada.org/static/images/2020/03/crimen-y-castigo-160×160.jpg 160w, https://cdn.isliada.org/static/images/2020/03/crimen-y-castigo-97×97.jpg 97w, https://cdn.isliada.org/static/images/2020/03/crimen-y-castigo.jpg 720w” layout=intrinsic><noscript>
</noscript></amp-img>Issue also reported here: https://github.com/ampproject/amp-wp/issues/4491
For a quick fix, please try disabling the Optimizer by using this plugin: https://gist.github.com/westonruter/8d52c0b807e6dfbbdf2219622d0f4a7e
@escael Do you have W3 Total Cache or some other caching plugin active that optimizes the page? Please also try turning off HTML minification that may be getting performed.
@westonruter Yes. I have W3 Total Cache
OK, please try turning off the HTML Minifier.
I will try it tomorrow. But on my local server there is no problem. I have the same version of php as in production. The only difference is that in production I have a CDN configured.
Hi, @westonruter. Effectively disabling the minify option works correctly.
But this solution brings the inconvenience of the loss of performance due to an unminified code. Who should fix it?
Thank youDisabling the HTML Minify option in W3 Total Cache fixes it? Please deactivate the plugin that disables the AMP Optimizer to confirm the issue is fixed at https://www.isliada.org/libros/el-sol-desnudo/amp/
This here is specifically then a bug with W3 Total Cache which they should fix. They’re erroneously removing the trailing slash in the SVG image which must be valid XML. This is the
imgin question:<img alt="" aria-hidden="true" class="i-amphtml-intrinsic-sizer" role="presentation" src="data:image/svg+xml;charset=utf-8,<svg height="75" width="75" xmlns="http://www.w3.org/2000/svg" version="1.1"/>">That final
/needs to be kept intact.We’re investigating ways to make the
data:URL more resilient to this kind of thing (e.g. by using base64-encoding), but ultimately the big appears to be the responsibility of W3 Total Cache.Done!! I have disabled the plugin
Excellent. No validation errors now occur.
I’ve filed a bug report with W3 Total Cache so they can fix the underlying problem with the HTML minfication: https://github.com/W3EDGE/w3-total-cache/issues/162
W3 Total Cache v0.13.3 has been released to fix this issue. After upgrading, you can deactivate and install my “AMP Disable SSR” plugin (no need to disable server-side rendering or the AMP Optimizer as a whole any longer).
-
This reply was modified 6 years, 1 month ago by
The topic ‘Error images’ is closed to new replies.