You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pagespeed.apache.org by GitBox <gi...@apache.org> on 2021/05/12 18:49:13 UTC

[GitHub] [incubator-pagespeed-mod] Lofesa commented on issue #2067: Image dimensions are erroneously supplied to amp-img>img elements

Lofesa commented on issue #2067:
URL: https://github.com/apache/incubator-pagespeed-mod/issues/2067#issuecomment-840017441


   Hi @westonruter 
   As far as I know only the filters `resize_images` and  `resize_rendered_image_dimensions` can be related to this issue.
   Pagespeed by default has a [rewrite level core](https://www.modpagespeed.com/doc/config_filters#level) that enables the `resize_images`.
   
   There are some ways to disable these filters:
   
   ```
   pagespeed DisableFilters filtera,filterb; (nginx)
   ModPagespeedDisableFilters filtera,filterb (apache)
   ```
   But these disables the filters for all request, not only for amp pages.
   Maybe some type of logic can disable these filters only for amp request. If I remember the AMP Plugin put amp as an arg to the url, so some like this may work:
   
   ```
   if ($args = amp) {
                set $disable_filters "resize_images,resize_rendered_image_dimensions";
         }
   
    pagespeed DisableFilters "$disable_filters";
   
   ```
   That´s nginx syntax, I don´t know if in apache can be done.
   
   
   
   `pagespeed UrlValuedAttribute amp-img src image`
   
   in their config


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org