-
Notifications
You must be signed in to change notification settings - Fork 15
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
Toggle lazy-load in the project's settings #101
Comments
Have you already looked at daguerre-preadjust? Does it meet your needs? It sounds like you're looking for a solution that does the adjustment creation when the image is uploaded rather than when it's loaded, so a cron solution might not be exactly what you're looking for. Rather than just adding the |
Thanks for the feedback! Baring that in mind, I suggest we close this issue for the time being. Thanks for your help! |
Eh, It's still a useful ticket. I'd be curious to know more about your use case if it's something you'd be willing to share? |
We use daguerre's adjust tag in several places and a global generate=True settings suits us because:
|
When you say the AJAX URLs are cached, do you mean that your site is using django There is definitely not an intent on our end that those URLs should be cached anywhere. The lazy rendering should work just fine for near real-time viewing of image variations. (I'm not addressing the SEO side of things intentionally right now because that's less high priority than a potential caching issue.) |
When using template tags, we are using Django's template fragment caching as described in the official documentation. When the template was first compiled/rendered, the first URL that the template tag received was cached for the period of time specified in the |
Greetings!
Firstly, great job developing this library!
Secondly, the documentation states that the adjust tag renders as a URL to the adjusted image as lazily as possible. This is a great feature, but have you ever considered setting the generate parameter project-wide?
To make thing clearer, here's an example. A site allows the users to upload their own images and there is a predefined set of variations that can be diplayed, e.g. only thumbnails of 300x200px and 600x400px. The process of generating these variations can be triggered after uploading the image.
In order to be backwards compatible, this setting could be set in the project's settings and the default value would remain False. Therefore, if the project does not have the variable set, it would maintain its previous functionality.
We already have a working example. I'd be happy to implement it and send you a pull request.
What are your thoughts on the matter?
Sincerely,
Filip Todic
The text was updated successfully, but these errors were encountered: