[resolved] Replace demo images with dummy image on XML export? (7 posts)

  1. hhins
    Posted 2 years ago #

    I have a situation where I want a person to use my sample XML export file but just want all images to be blacked/greyed out boxes when they import on their end. The images should be the same dimensions as the originals.

    I think I may need to result in doing the following if there's no way to do it programatically:

    1. Create the export XML
    2. Run a Photoshop action to fill images black, rename them all to /blacked_whatever.png
    3. Do a find/replace on all images in the XML export, adding the blacked_xxxx
    4. Place a second copy of all images on the server

    (I realize people could then just rename the images to get the original, but that's not the point)

    Any ideas, plugin suggestions?

  2. Krishna
    Volunteer Moderator
    Posted 2 years ago #

    Try using an incomplete img URL so that the resultant URLs will only show an empty space of the same size.

  3. hhins
    Posted 2 years ago #

    Hmm, that's not going to work unfortunately with featured images / post formats unfortunately. :/

    Any other ideas?

  4. Krishna
    Volunteer Moderator
    Posted 2 years ago #

    Did you try that? Can you post an img URL that works?

  5. hhins
    Posted 2 years ago #

    I'm just testing locally for now.

    I renamed the XML file references to the uploads folder (I only use images) to /uploads-null/ and ran the import. As expected, got the failed to import xxxxx images but since they're used as featured images, no broken images are set, they're just skipped.

  6. hhins
    Posted 2 years ago #

    Just an update on this situation in case it helps others, here's what I ended up doing:

    1. Exported my current demo site XML
    2. Within the XML export file, did a find/replace for wp-content/uploads to wp-content/uploads_demo
    3. Duplicated my uploads folder to create a second, uploads_new
    4. Ran a Photoshop action to grey out all photos in uploads_new
    5. Imported the edited XML file

    To summarize, this was to allow images to be imported in a demo site for a customer without running into "redistributing" licensing issues.

  7. hhins
    Posted 2 years ago #

    (Marking as Resolved)

Topic Closed

This topic has been closed to new replies.

About this Topic