with mod_pagespeed how do I drop some of the file name?
« on: October 15, 2020, 01:10:38 AM »
Issue with Images plugin.

I have to admit, I wish I had known that development had stopped two years ago on this script. However, here is the issue I've run into.

I use mod_pagespeed to optimize my web sites, and get that "Grade A" everyone is looking for. The trouble is mod_pagespeed renames the files so when I look at the xml file I have (bold chars are those added by mod_pagespeed) :-

  <url>
       <loc>[ External links are visible to forum administrators only ]</loc>
       <lastmod>2020-10-14T23:07:03+00:00</lastmod>
       <changefreq>monthly</changefreq>
       <priority>0.6400</priority>
       <image:image>
         <image:loc>[ External links are visible to forum administrators only ]xThe_Tribal_Shoot-07-12-2015-188-me.jpg.pagespeed.ic.P8ci0xcDUi.jpg</image:loc>
         <image:caption>The_Tribal_Shoot-07-12-2015-188.jpg</image:caption>
       </image:image>
 </url>

Is there any way to stop this being added to the xml file?

The real name of the file "The_Tribal_Shoot-07-12-2015-188.jpg" will not change, but that is not guaranteed with the mod_pagespeed modified file name, it will change next time the file is re-optimized.

Any help would be gratefully received. Many Thanks, Stay Safe, Nigel Aves.
Re: with mod_pagespeed how do I drop some of the file name?
« Reply #1 on: October 15, 2020, 09:26:50 AM »
Hello,

you can add "pagespeed" in the Exclude URLs setting.
Re: with mod_pagespeed how do I drop some of the file name?
« Reply #2 on: October 15, 2020, 07:58:17 PM »
"you can add "pagespeed" in the Exclude URLs setting." >> I did try that but then I get no images at all!  :-\ in the sitemap.

The problem is that the php script is "following the link", and mod_pagespeed is serving up the modified / compressed image name.

Do you know of a way of forcing the php script to only use the "IMG SRC" image name, that's all I need to fix the issue. I've attached the raw html code.

Many Thanks, Nigel.

<img src="../../../_data/i/galleries/colorado-modeling-network/cmn-burlesque/bits-and-pieces/cmn-burleque-04-28-2012-057-me.jpg" width="427" height="594" alt="cmn-burleque-04-28-2012-057.jpg" id="theMainImage" usemap="#mapmedium" title="Burlesque - April 2012" data-pagespeed-url-hash="3238081532" data-pagespeed-onload="pagespeed.CriticalImages.checkImageForCriticality(this);" data-pagespeed-lsc-url="[ External links are visible to forum administrators only ]" srcset="[ External links are visible to forum administrators only ] 1.5x,../../../_data/i/galleries/colorado-modeling-network/cmn-burlesque/bits-and-pieces/cmn-burleque-04-28-2012-057-me.jpg 2x" onload="var elem=this;if (this==window) elem=document.body;elem.setAttribute('data-pagespeed-loaded', 1)">
Re: with mod_pagespeed how do I drop some of the file name?
« Reply #3 on: October 16, 2020, 09:09:27 AM »
Hello,

there is no option for that, unfortunately.
Re: with mod_pagespeed how do I drop some of the file name?
« Reply #4 on: October 16, 2020, 05:31:24 PM »
Question 1.

I don't suppose that there is a simple PHP change I could make to get the behaviour that I would like?

Question 2.

I'm really surprised that there have been no updates to this program for 2 years. You advertise that you get free updates, but if you've stopped development doesn't that come under the banner, "False Advertising"?