WordPress doesn’t support the upload of SVG files by default. If you’re using a plugin to enable such capability, then the issue is likely with that plugin rather than mine.
My plugin does some checks to see if an image should be regenerated or not:
https://github.com/Viper007Bond/regenerate-thumbnails/blob/v3.0.2/regenerate-thumbnails.php#L369-L397
If it thinks it is, then it just calls the same functionality that gets called when you upload something for the first time.
Oh, actually, that check my plugin does will return true due to the MIME type of SVG files.
However as mentioned, I should work fine because it’s just calling the same code that gets called when you upload for the first time.
How are you enabling SVG support? I’ll try to reproduce.
Hi Alex,
Many thanks for your reply. The SVG support is already enabled as a part of the theme.
But since the SVG files in the theme are only used for a few icons, I started moving everything onto the good old PNG’s yesterday. The SVG is just too much trouble.
I’m using the S3 Offload for Amazon bucket also and I don’t think it works very well together with the SVG files. This is not the first time the SVG files got corrupted, but every time I was able to just re-upload them again and keep them locally on the server.
After running the regenerate thumbnails process it got corrupted again, but this time, I can’t even re-upload the files like I used to. When I re-upload, it still remains corrupted. So I’m just trying to figure out where is this coming from.
J.
Ah, sounds like an issue with the theme then. My plugin doesn’t use any custom thumbnailing functionality — it calls the same code that runs when the file is first uploaded. So if it’s not working then, then it’s not going to work with my plugin either.