WordPress.org

Ready to get started?Download WordPress

Forums

Cache Images
Doesn't Handle URL-encoding (5 posts)

  1. UltraNurd
    Member
    Posted 2 years ago #

    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.

  2. Bilbotorm
    Member
    Posted 2 years ago #

    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

    Cheers

  3. jim747
    Member
    Posted 2 years ago #

    Hi

    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?

    Regards
    Jim

  4. khag7
    Member
    Posted 2 years ago #

    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 :(

  5. khag7
    Member
    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic