Problem/Motivation
Modules like adaptive_image have no way of reacting to image_path_flush();
Proposed resolution
I propose adding an extra hook at the end of image_path_flush(), like this:
module_invoke_all('image_path_flush', $path);
Remaining tasks
- Review and approve
User interface changes
- None
API changes
- New hook_image_path_flush($path) is added.
Data model changes
- None
Comment | File | Size | Author |
---|---|---|---|
#17 | After patch applied.png | 129 KB | mitthukumawat |
#15 | 2558207-15.patch | 1.48 KB | ranjith_kumar_k_u |
| |||
#4 | add_hook_image_path_flush-2558207-4.patch | 1.52 KB | gielfeldt |
#3 | add_hook_image_path_flush-2558207-3.patch | 1022 bytes | klaasvw |
Adds-new-hook_image_path_flush_path-2558195-2.patch | 2.98 KB | rmontero | |
Comments
Comment #2
rmontero CreditAttribution: rmontero as a volunteer and at Achieve Internet commentedComment #3
klaasvw CreditAttribution: klaasvw at Randstad Digital commentedI had similar problems when combining the epsacrop module with storage_api. Since storage_api defined a custom file wrapper it will never know when the cropping is updated.
Here's a cleaned up version of the previous patch:
- Removed .idea xml code
- Added hook documentation to image.api.php
Comment #4
gielfeldt CreditAttribution: gielfeldt commentedDrupal 8.2.x patch
Comment #5
gielfeldt CreditAttribution: gielfeldt commentedComment #15
ranjith_kumar_k_u CreditAttribution: ranjith_kumar_k_u at Zyxware Technologies commentedRe-rolled for 9.2
Comment #17
mitthukumawat CreditAttribution: mitthukumawat as a volunteer and at Zyxware Technologies for Drupal Association commentedPatch #15 applied cleanly for me. Adding screenshot of the diff.
Comment #21
smustgrave CreditAttribution: smustgrave at Mobomo commentedThis issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request as a guide.
For this new feature it will need test cases to go along with it.
Tagged for subsystem maintainer review for their thoughts. They may have some tweaks or suggestions.
Did not review code.