Skip to content
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

Page ID in the file name prevents caching and creates unnecessary copies #2033

Open
flipzoom opened this issue Jan 30, 2025 · 0 comments
Open

Comments

@flipzoom
Copy link

I noticed a different behaviour of inline images in the new Main version 3.0.244. When an inline image is placed, this image receives the page ID in the form of ‘is-pid0000’ with in the file name, from the page where the image is placed.

This has the following problem in a scenario where images are used that are stored on other pages, e.g. on a central page for global assets, or I reuse images, e.g. an image of a contact person:

Image

  • There are countless copies of the same image, which unnecessarily takes up storage space.
  • The identical image cannot be cached for the first request. Although it is the identical image, it must always be downloaded again due to the different file name, where it is used on a different page with a different ID.

Example of setup:

  • A page called ‘Global Assets’ where images are stored in an image field.
  • Any number of pages that insert inline images in TinyMCE or CKEditor using the PWImage module.
  • This results in any number of copies of the original image, only with a different file name. Even with identical croppings or sizes.
  • The first time any page is viewed, the image has to be downloaded again by the browser, even though there is no difference to the original image.

My thoughts:

Doesn't it make more sense, logically, to insert the ID of the page where the image is originally stored in the file name, so that the ID can be used to recognise it? Then no unnecessary copies would be created, or the image would come from the cache on the second request, regardless of the page on which it is used.

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

No branches or pull requests

2 participants