Image dimension having problem in amp version
-
Hi, I have two questions about two issues
1) There is an image dimension issue on live url. but there is no issue on local url. I am sending two link.
Local environment url:
On amp local environment, original image dimension is applying
Live Environment url:
While on amp live environment, there is a fix image dimension (474px x 400px) applying on whole website images.
Please help me from where i can fix this issue. From where it is applying so that i can fix.
2) I want to add Leedfeeder tracker on amp version. this is the link
https://help.leadfeeder.com/en/articles/3691296-how-do-i-install-the-leadfeeder-tracker
Is there any way to add this code in amp version?
Thank you. I will wait for your response.
-
1) There is an image dimension issue on live url. but there is no issue on local url. I am sending two link.
The issue is most likely because loopback requests are not working properly on your live environment. If you go to Site Health in the admin, do you see the test for loopback requests working properly? If not, then this is likely why the image dimensions aren’t being discovered.
You can fix the issue if you supply the width/height in the original HTML. Note that if the image is in the content, then this will happen automatically as of WordPress 5.5. Otherwise, the issue will be improved in the future with https://github.com/ampproject/amp-wp/issues/5115
2) I want to add Leedfeeder tracker on amp version. this is the link
Apparently you can use Google Tag Manager to add Leedfeeder. That being the case, you could then add
<amp-analytics type="gtag" data-credentials="include">...</amp-analytics>
as documented here: https://developers.google.com/gtagjs/devguide/ampHi, Sorry for late reply. I was not available in last week.
1) Please see this link. I have attached the screenshort of site health about amp. Are you saying about that thing?
2) You are saying if i add Leedfeeder in GTM. Then it will applies on amp vesion as well. I don,t need to use “amp-analytics” tag. Am I right?
Please guide me about these two things.
Thank you
If you’d like to copy and paste your full Site Health info (see this screenshot) we can determine the loopback request status. If you’d like to define the width and height within the image we can also check your sites AMP version.
2) You are saying if i add Leedfeeder in GTM. Then it will applies on amp vesion as well. I don,t need to use “amp-analytics” tag. Am I right?
Good question. It’s part of the GTM Community Template Gallery, so allow me some time to check for cross compatibility.
Hi @jamesosborne Sorry for late reply.
1)This is site health info
### wp-core ### version: 5.4.2 site_language: en_US user_language: en_US timezone: +00:00 permalink: /%postname%/ https_status: true user_registration: 0 default_comment_status: closed multisite: false user_count: 1 dotorg_communication: true ### wp-paths-sizes ### wordpress_path: /data/58/1/110/57/1925546/user/2098275/htdocs wordpress_size: 5.51 GB (5911163012 bytes) uploads_path: /data/58/1/110/57/1925546/user/2098275/htdocs/wp-content/uploads uploads_size: 2.67 GB (2871960282 bytes) themes_path: /data/58/1/110/57/1925546/user/2098275/htdocs/wp-content/themes themes_size: 1.04 GB (1111584895 bytes) plugins_path: /data/58/1/110/57/1925546/user/2098275/htdocs/wp-content/plugins plugins_size: 124.66 MB (130716241 bytes) database_size: 64.23 MB (67350451 bytes) total_size: 9.40 GB (10092774881 bytes) ### wp-dropins (1) ### advanced-cache.php: true ### wp-active-theme ### name: (creative_system) version: undefined author: Anonymous author_website: (undefined) parent_theme: none theme_features: post-thumbnails, amp, editor-style, automatic-feed-links, menus, html5, post-formats, custom-background, featured-content, custom-header, woocommerce, widgets theme_path: /data/58/1/110/57/1925546/user/2098275/htdocs/wp-content/themes/creative_system ### wp-themes-inactive (3) ### Twenty Fourteen: version: 1.1, author: the WordPress team (latest version: 2.9) Twenty Nineteen: version: 1.0, author: the WordPress team (latest version: 1.7) Twenty Twenty: version: 1.2, author: the WordPress team (latest version: 1.5) ### wp-plugins-active (23) ### All In One SEO Pack: version: 3.6.2, author: All in One SEO Team AMP: version: 1.5.3, author: AMP Project Contributors (latest version: 1.5.5) AWS for WordPress: version: 4.2.1, author: AWS Labs, WP Engine (latest version: 4.2.2) Classic Editor: version: 1.5, author: WordPress Contributors (latest version: 1.6) Contact Form 7: version: 5.1.7, author: Takayuki Miyoshi (latest version: 5.2.1) Cookie Notice: version: 1.3.2, author: dFactory Custom Post Type UI: version: 1.7.4, author: WebDevStudios Drag and Drop Multiple File Upload - Contact Form 7: version: 1.3.5.3, author: Glen Don L. Mongaya (latest version: 1.3.5.4) Dynamic Featured Image: version: 3.7.0, author: Ankit Pokhrel Lazy Load - Optimize Images: version: 2.3.3, author: WP Rocket Newsletter: version: 6.8.2, author: Stefano Lissa & The Newsletter Team (latest version: 6.8.4) Post Duplicator: version: 2.20, author: Metaphor Creations (latest version: 2.21) ReCaptcha v2 for Contact Form 7: version: 1.2.7, author: IQComputing Simple Custom Post Order: version: 2.5.0, author: Colorlib Sucuri Security - Auditing, Malware Scanner and Hardening: version: 1.8.24, author: Sucuri Inc. Testimonial: version: 2.2.2, author: ShapedPlugin W3 Total Cache: version: 0.14.3, author: BoldGrid (latest version: 0.14.4) WooCommerce: version: 4.3.1, author: Automattic (latest version: 4.3.3) WooCommerce Google Analytics Integration: version: 1.4.22, author: WooCommerce WP-PageNavi: version: 2.93.3, author: Lester 'GaMerZ' Chan WP Database Backup: version: 5.5.1, author: Prashant Walke (latest version: 5.5.3) WP Google Map Pro: version: 5.2.1, author: flippercode Yoast Duplicate Post: version: 3.2.5, author: Enrico Battocchi & Team Yoast ### wp-plugins-inactive (4) ### SumoMe: version: 1.31, author: SumoMe WooCommerce Admin: version: 0.13.2, author: WooCommerce (latest version: 1.3.2) WooCommerce Blocks: version: 2.4.1, author: Automattic (latest version: 3.1.0) WP Fastest Cache: version: 0.9.0.4, author: Emre Vona (latest version: 0.9.0.9) ### wp-media ### image_editor: WP_Image_Editor_Imagick imagick_module_version: 1680 imagemagick_version: ImageMagick 6.9.0-3 Q16 x86_64 2016-05-20 https://www.imagemagick.org imagick_limits: imagick::RESOURCETYPE_AREA: 55 GB imagick::RESOURCETYPE_DISK: -1 imagick::RESOURCETYPE_FILE: 768 imagick::RESOURCETYPE_MAP: 55 GB imagick::RESOURCETYPE_MEMORY: 27 GB imagick::RESOURCETYPE_THREAD: 1 gd_version: bundled (2.1.0 compatible) ghostscript_version: unknown ### wp-server ### server_architecture: Linux 4.4.5-hardened-r2 x86_64 httpd_software: Apache php_version: 7.0.2-pl0-gentoo 64bit php_sapi: cgi-fcgi max_input_variables: 1000 time_limit: 30 memory_limit: 512M max_input_time: -1 upload_max_size: 100M php_post_max_size: 100M curl_version: 7.39.0 OpenSSL/1.0.2h suhosin: false imagick_availability: true htaccess_extra_rules: true ### wp-database ### extension: mysqli server_version: 5.0.91 client_version: mysqlnd 5.0.12-dev - 20150407 - $Id: 7e72f9690b1498a1bead7a637c33a831c0d2f655 $ ### wp-constants ### WP_HOME: undefined WP_SITEURL: undefined WP_CONTENT_DIR: /data/58/1/110/57/1925546/user/2098275/htdocs/wp-content WP_PLUGIN_DIR: /data/58/1/110/57/1925546/user/2098275/htdocs/wp-content/plugins WP_MAX_MEMORY_LIMIT: 512M WP_DEBUG: false WP_DEBUG_DISPLAY: true WP_DEBUG_LOG: false SCRIPT_DEBUG: false WP_CACHE: true CONCATENATE_SCRIPTS: undefined COMPRESS_SCRIPTS: undefined COMPRESS_CSS: undefined WP_LOCAL_DEV: undefined DB_CHARSET: utf8 DB_COLLATE: undefined ### wp-filesystem ### wordpress: writable wp-content: writable uploads: writable plugins: writable themes: writable ### amp_wp ### amp_mode_enabled: transitional amp_templates_enabled: post, page, is_singular, is_front_page, is_home, is_category amp_serve_all_templates: false amp_css_transient_caching_disabled: false amp_css_transient_caching_threshold: 5000 transients per day amp_css_transient_caching_sampling_range: 14 days amp_css_transient_caching_transient_count: 159 amp_css_transient_caching_time_series: 20200615: 0 20200625: 44 20200706: 48 20200707: 48 20200811: 0 20200817: 78 20200818: 78
2) Please see these screenshorts as well
This issue is appearing because of 474 x 400 dimension is applying on every image. thats why images are breaking.
On local server there is no issue.
I will wait for your response.
Thank you
- This reply was modified 4 years, 3 months ago by franks123.
Nothing stands out from first inspection in relation to Site Health information. Have you tried to define the natural widths and height dimensions within the images contained in your sites header?
hi @jamesosborne
Sorry for late reply. You are saying that i have to give width and height to each image. Am i right?Thank you
No problem. And yes, you are correct. Adding a width and height should fix that for you. Let me know whether that works for you.
Hi, i want to know about Leedfeeder in Amp version. In above discussion, There is a method mentioned to add Leedfeeder. But i want to clarify that if i use this link to add leedfeeder.
https://help.leadfeeder.com/en/articles/3727657-how-to-install-leadfeeder-tracker-using-google-tag-manager-and-the-leadfeeder-tracker-templateThen i don,t need to use amp analytics code mentioned below.
<amp-analytics type=”gtag” data-credentials=”include”>…</amp-analytics>Means if i add leadfeeder code in GTM, then it will be available in amp version or not?
Please guide me about this thing.
Thank youIt might be best to contact Leadfeeder in relation to AMP support. The Feedmanager Google Tag Manager Template is only available for web containers within Google Tag Manager.
1) I did not understand your point. Can you please more elaborate and provide me guide link so that i can understand.
2) Will i add amp analytics tag in head tag or amp plugin automatically apply analytics tag on amp version?
3) I will use that link for analytics in amp version or amp plugin will do that automatically?
https://developers.google.com/gtagjs/devguide/amp
Thank youWhen you’re setting up a Google Tag Manager container you’re presented with an option to implement a web container or an AMP container. Many tags won’t work in AMP URLs (if you’ve selected a web container).
The guide for the Leadfeeder tag type applies to a web container.
If you’re looking to implement Leadfeeder for AMP URLs you can contact Leadfeeder support, I don’t see them listed as approved amp-analytics vendors although they should be able to assist.
Will i add amp analytics tag in head tag or amp plugin automatically apply analytics tag on amp version?
You can use this guide for implementing Analytics within the plugins Analytics settings or using filters.
1) Analytics tab in Amp plugin will only work for amp version.
2) I will add leadfeeder code in web container and let you know if any issue will appear.
thank you
- The topic ‘Image dimension having problem in amp version’ is closed to new replies.