Wrong image path when re arranging the article structure

I have a modular one page site, where the articles are set to sortable. when re arranging the articles, the folder name is changed (different number), and then the media links (custom image fields) are wrong. What is the best way to use sortable modular pages with images, so that the image url will remain correct after re arranging the articles?

Thanks

Hi @hleinan, can you share the Twig code you are using for this? Might lead to some ideas…

1 Like

don´t need the twig code, since I can see in the admin that the image is not displaying. You can see it in the page media block, but not in the background image custom field property. When looking at the markdown file, I see that the path is the old path:

The yaml:

extends@: default

form:
fields:
tabs:
type: tabs
active: 1

  fields:
    content:
      type: tab
      fields:

        header.custom.backgroundImage:
          type: file
          label: background Image
          destination: 'self@'
          multiple: false
          accept:
            - image/*

I changed the destination to a predefined folder instead of @self, and that is an ok workaround. Still find it strange that the @self will get broken after re-arranging the structure. Everything else is using relative paths as far as I can tell

But it is a workaround so I can move forward.

Thanks

Could it be a cache problem ?