I am having trouble locating and deleting static legacy modules. Using Google page speed tests I realized I have some render-blocking resources.
Then using the google developers coverage tool I found that on none of my pages does either legacyGalleryModule.css or legacyImageModule.css run. Because of this, I would like to delete them in order to increase our page speed insights score. However, I can not find the files so I can not delete them. Does anyone have insight into this? This is one of the files I am talking about.
I've taken another look at your site, run a test in my own developer environment and determined that it's hubspots default gallery module that's loading the css in question.
Again, note that it's only loading on your homepage, you can confirm this using "view page source" in chrome.
You can also clone the homepage, remove the gallery modules and view the page source of the clone in chrome to confirm that it removes the stylesheet.
I think the best solution would be to either remove those sliders on the homepage or replace them with a custom module that doesn't load that stylesheet.
To my knowledge, the specified stylesheet is not required for the sort of slider you have set up. So you could build a custom module that uses the same underlying "slick slider" stylesheet and javascript without needing to load legacyGalleryModule.css
If neither of those resolve it take a look at the modules being used in the page. If there's custom modules in there, go into the Design Manager and look for linked stylesheets in the modules.
An alterante way of troubleshooting which module is causing the styelsheet to load (again, once you've eliminated both page and template level as culprits) would be to clone the homepage and remove the modules on the clone one by one and check the source code of the site in Chrome to see when the specified stylesheet ("<link rel="stylesheet" href="/hs/hsstatic/legacy-module-support/static-1.27/bundles/legacyGalleryModule.css">") disappears.
Hope that's of some help, let me know how you get on!