Support » Plugin: Regenerate Thumbnails » SVG files corrupted

  • Resolved Joe Bloggs

    (@joe-bloggs)


    Hi there Alex,

    Awesome plugin, no doubt, many thanks for that!

    I ran into an issue with SVG files.

    After running the process, all my SVG icons appear corrupted. Have you ever come accross to something similar?

    Is there a way perhaps to exclude certain files from the thumbnail regeneration process?

    Many thanks,

    Joe

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Alex Mills

    (@viper007bond)

    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.

    Plugin Contributor Alex Mills

    (@viper007bond)

    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.

    • This reply was modified 1 year ago by  Alex Mills.
    Joe Bloggs

    (@joe-bloggs)

    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.

    Plugin Contributor Alex Mills

    (@viper007bond)

    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.

    Joe Bloggs

    (@joe-bloggs)

    No worries, thanks Alex

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘SVG files corrupted’ is closed to new replies.