Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter Jason LeMahieu (MadtownLems)

    (@madtownlems)

    As I continue to troubleshoot, I found another issue related to this. The generated files that come across as a result of this are also named differently.

    The original/source site has:
    2023-Annual-Summary_Page_1.jpg
    2023-Annual-Summary_Page_1-scaled.jpg
    then a large number of generated sizes, such as:
    2023-Annual-Summary_Page_1-1191×1536.jpg
    2023-Annual-Summary_Page_1-150×150.jpg

    On the target/imported site, you will NOT find:
    2023-Annual-Summary_Page_1.jpg

    Instead, you will find things like:
    2023-Annual-Summary_Page_1-scaled-1.jpg
    and
    2023-Annual-Summary_Page_1-scaled-1-1191×1536.jpg
    (every single file related to this media item has “-scaled” in it.


    Moderator Felipe Santos

    (@foosantos)

    Hi there,

    I just tried to export some images that have been edited and couldn’t reproduce this issue. Can you please provide more details?

    Do you remember of changing the structure of the images? That is the first thing that came to my mind based on parts like https://new-network.edu/subsite/wp-content/uploads/sites/496/2022/10/Trail-building-River-Valley-Conservation-10.11.22.jpg.

    Thread Starter Jason LeMahieu (MadtownLems)

    (@madtownlems)

    Hi there. Here are my steps to reproduce. This is on WP 6.5.5 multisite with 2019 Theme, and the Block Editor. I did this on a subsite called “/sitefrom/”.

    1. Upload image.jpg
    2. Use image.jpg in a new Post. I made my post be the following:
      “BEFORE EDITING”
      “Thumbnail”
      (Image block using image.jpg in thumbnail size)
      “Medium”
      (Image block using image.jpg in medium size)
      “Large”
      (Image block using image.jpg in Large size)
      “Full”
      (Image block using image.jpg in Full size)
    3. Edit the image. I cropped it into a different aspect ratio.
    4. Edit the post, and append the following:
      “AFTER EDITING”
      “Thumbnail”
      (Image block using image.jpg in thumbnail size)
      “Medium”
      (Image block using image.jpg in medium size)
      “Large”
      (Image block using image.jpg in Large size)
      “Full”
      (Image block using image.jpg in Full size)

    Verify that the post shows 4 different sizes of the original image, followed by 4 different sizes of the edited image. Perfect!

    5. Export all content.
    6. Import it onto a new site on the same network (mine is called /siteto/). And view the post. Note that many of the Image tags were NOT backfilled, and still use images from /sitefrom/.

    For the original, pre-edited, Image Blocks, Thumbnail, Medium, and Large, all still refer to /sitefrom/. Only the Full size uses the image from /siteto/. Note that is uses the edited filename: /2024/07/image-e1720554498236.jpg

    All of the post-edited Image Blocks reference /siteto/ as expected, and all have the edited filename, such as: 2024/07/image-e1720554498236-183×300.jpg

    So, it seems that any Image tags created before the image was edited are not properly backfilled on the new site. And I don’t think they actually CAN be, currently, because those underlying image files didn’t get copied in the export/import and don’t actually exist on the new site.

    /sitefrom/’s upload folder contains a total of 12 image files (all related to this one media item. approximately half of generated sizes of the original, and half of the edited version)

    where /siteto/’s upload folder only contains 5 image files (all based on the edited image). in fact, image.jpg is not even present there, only image-e1720554498236.jpg

    So, I think the key part here is using an image on a site, THEN editing it, then exporting/importing. That’s when things get lost.

    Moderator Felipe Santos

    (@foosantos)

    Hi there,

    It’s interesting that I can reproduce it as well. And the edited/cropped image was not even edited from my end:

    https://d.pr/i/wrPU74
    Full Size: https://d.pr/i/wrPU74

    I wonder if it is related to this already reported issue: https://github.com/WordPress/wordpress-importer/issues/101

    Can you check and let me know if this makes sense? I tested on a regular installation (not multisite), and also reproduced something similar.

    Thread Starter Jason LeMahieu (MadtownLems)

    (@madtownlems)

    I just did a simple test of exporting a post with a Cover Block and Media/Text Block, and got slightly odd behavior – though it doesn’t sound like what you got.

    My Cover Block actually updated perfectly. The url attribute of the imported block contains the link to the image on the new site. Perfect.

    However, the attribute for the Media & Text Block did not (though the MARKUP did). So, investigating the markup from the front-end makes it look like it went fine, but there’s still a reference to the old site in the “mediaLink” attribute of the wp:media-text block.

    (However, this all feels like a fundamentally different issue, though.)

    Moderator Felipe Santos

    (@foosantos)

    Makes total sense! I believe the ideal next step would be to create an issue on GitHub with all the details about that.

    Would you like to do that? I’m happy to help and also create it for you if you would like. ??

    Thread Starter Jason LeMahieu (MadtownLems)

    (@madtownlems)

    “I’m happy to help and also create it for you if you would like”

    That would be awesome! Thank you for doing that. Drop a link here so I can follow along and clarify/test anything if needed, please. Cheers!

    Moderator Felipe Santos

    (@foosantos)

    Fantastic, @madtownlems!

    I added to my to-do list here to just have some additional tests and I’ll share here as soon as I publish it.

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.