How to get the generate command to work with directive parameters? #130
-
I am not using the control panel field. I am just using the blade directive like so:
I'm pretty sure this means that the generate command will not create the images needed for this particular view. I ran some tests which confirmed this. It seems that GenerateGlideImageJobs are only created based on the original image dimensions, which in my case I don't need at all. I am always using custom ratios using the method above. The default behaviour is queuing up thousands of jobs for dimensions that my project will never use. So how would I go about including these ratios in the generation jobs? It would be awesome if the package could scan php files for usages of the tag or directive and add these parameters to the jobs, sort of like how the Tailwind purge works, but that's probably a big ask. Config file parameters could work too. e.g.: Thanks for reading. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Correct.
There is no way to do this. As explained in this section: https://github.com/spatie/statamic-responsive-images#using-responsive-images
There is rarely a good reason to use the manipulation cache with responsive images, it will only lead to unnecessary load & storage. |
Beta Was this translation helpful? Give feedback.
Correct.
There is no way to do this.
As explained in this section: https://github.com/spatie/statamic-responsive-images#using-responsive-images
There is rarely a good rea…