Skip to content

Do not display uploaded images on the page before clicking save. #560

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
PawelGIX opened this issue Mar 23, 2025 · 1 comment
Open

Do not display uploaded images on the page before clicking save. #560

PawelGIX opened this issue Mar 23, 2025 · 1 comment

Comments

@PawelGIX
Copy link

I often use the API to output images directly from image fields without going through the WYSIWYG.

When I go to add an image in the admin, I discovered that this image is immediately displayed on the front end, even before I save the page. And if I decide not to save my changes, the image is still saved to the page!

This almost burned me a couple times when I uploaded an image just as a demonstration and then later discovered that the image had actually gone up on the site!

@Toutouwai
Copy link

That's not normal PW behaviour and when I tested I couldn't reproduce it. If images have been uploaded but the containing page not saved, those images are not part of the formatted value of the images field. Check that:

  1. You are not outputting the unformatted value of the field somehow, e.g. page output formatting is off, or you are using $page->getUnformatted()
  2. There is no module or non-core code that is automatically saving the page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants