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

Thought collection #2

Open
liayn opened this issue May 23, 2024 · 2 comments
Open

Thought collection #2

liayn opened this issue May 23, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@liayn
Copy link

liayn commented May 23, 2024

Just a collection of some thoughts:

  • Instead of returning the generated image as a response, better redirect to itself, so the second request is answered by the webserver with the rendered image => all headers are as they should be or as configured by the webserver and nothing needs to be mimicked by PHP.
  • I would remove all unit tests which simply test a getter that returns the value straight, that has no real value
  • Hardcoded serialized data in tests are rather cumbersome to maintain, consider doing the serialization during runtime maybe or create the mock data differently
  • The .htaccess rules need documentation that those need to match the file extensions for image_ext and/or media_ext
  • What about previews for pdf/ai/etc?
  • Maybe the queue can use the queue implementation of the core? (not sure if this is possible, just an idea)
@s2b
Copy link

s2b commented May 24, 2024

Instead of returning the generated image as a response, better redirect to itself, so the second request is answered by the webserver with the rendered image => all headers are as they should be or as configured by the webserver and nothing needs to be mimicked by PHP.

I would agree with that. That makes the implementation much easier.

@IndyIndyIndy
Copy link

Also, a way to still prioritize (directly render in the same request) some images could be really useful. For instance for a bunch of "above the fold" images or the "first x" images in a gallery.
Like a "preprocess" attribute in all image viewhelpers.

This extension is already very similar to the ideas I was about to implement and try out for some projects, so maybe I could test and contribute a bit.

@lukaszuznanski lukaszuznanski added the enhancement New feature or request label Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants