Support » Plugin: Cache Images » Doesn't Handle URL-encoding

  • When caching files that have a URL-encoded character in their path, such as %20 for space, the literal filename on disk remains URL-encoded, so when the post gets updated, the img src is wrong.

    For example, if an image links to “Foo%20bar.jpg”, the file is downloaded as “Foo%20bar.jpg” instead of “Foo bar.jpg”. I was able to quickly script something to move the files that had been named incorrectly, but definitely still a bug with the plugin.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi

    I am facing the same issue. Trying to import all images on my former blog on blogspot/blogger, and strange image names : +, space, %, makes the script buggy.
    It does not import all images; and it gets stuck at one point, not filling the img src/al links properly :'(

    if someone manages to patch this or get a trick to import all blogger images properly, i would welcome any advices



    I am having the same issue with % character. Did you solve the issue/ reworked the script? May I ask you to send it/ post it?


    Same issue here. Should be an easy fix. But the problems it causes are huge. I now have about 50 images which are broken and no easy way to rename them. I have to find the original image, replace it in the media library, then go through all the posts that use that image and update them to use the new source. Then repeat times 50. All cause of one small part of the code. Bummer 🙁

    The real problem is not in the plugin but in wordpress itself. The details are outlined here: WordPress bug ticket 16330

    The fix proposed at comment 16 by kawauso involves a small change to 1 line of code in each of 2 files, and removing 3 lines of code in a 3rd file. Here is the .diff file with the proposed code changes.

    Note that it is not recommended to edit these files, but if you know what you are doing you can fix the problem of + and % in filenames by editing the lines as shown.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Doesn't Handle URL-encoding’ is closed to new replies.