Receiving PageSpeed Insights "Enable compression on SVG files" recommendation with gzip or deflate enabled is a strange error with a simple solution.
Unfortunately, this action didn’t resolve the recommendation.
This situation was frustrating as I followed all of Google’s suggestions correctly but still having an error.
In the end the solution was simple, but because of the misleading recommendation the time to find it was significant.
After you double check that server compression is enabled you need to compress or more correctly edit the SVG file itself to reduce size.
- Temporary data used by the vector editing application
- Non-optimal SVG structure representation
- Unused and invisible graphical elements
After replacing the files with the new ones, the Enable compression error has resolved.