- Issue created by @dan_metille
- 🇰🇬Kyrgyzstan dan_metille
Make file save to the field’s configured file_directory instead of hard-coded public://
Hi and thanks for this great module!
I noticed that when generating images using the AI Media Image module, the files are always saved directly to the root public:// directory, instead of using the "File Directory" setting configured on the Media Image field (including any tokens like [date:custom:Y]-[date:custom:m]).
This makes it hard to keep files organized, especially on larger sites.
I've attached a patch that updates the module to respect the configured file directory for the Media Image field, just like standard uploads. The fix retrieves the field's directory setting, processes tokens, and ensures the image is saved in the correct subfolder.
Thanks for considering this improvement, and let me know if you need any adjustments!
Active
1.0
Code
Make file save to the field’s configured file_directory instead of hard-coded public://