MadHatter Posted April 12, 2017 Share Posted April 12, 2017 Can images be used as configuration options in modules? I'm trying to develop a module and I'd like the option to set an image to use, but so far I haven't had any success. Currently the images I upload to test are declared invalid (the debugger doesn't show a width so it throws an exception). SVG files work, but nothing is stored in the data value of the config field (returns an empty array). I've set the upload directory to a new directory inside assets and the images are uploaded, but not unlinked when image fails. Am I trying to do something that's not going to work? I feel like I'm close but can't seem to figure out what's missing. Thanks, MadHatter Link to comment Share on other sites More sharing options...
horst Posted April 12, 2017 Share Posted April 12, 2017 maybe you can find some posts here in the forums already. I remeber very vague that this has been discussed already. google search or Link to comment Share on other sites More sharing options...
MadHatter Posted April 12, 2017 Author Share Posted April 12, 2017 Looks like it can't be done... Link to comment Share on other sites More sharing options...
Macrura Posted April 12, 2017 Share Posted April 12, 2017 the way to do it would be to have the module create template/field/page to hold the image(s), and then in the module, reference that page.. 1 Link to comment Share on other sites More sharing options...
MadHatter Posted April 12, 2017 Author Share Posted April 12, 2017 14 minutes ago, Macrura said: the way to do it would be to have the module create template/field/page to hold the image(s), and then in the module, reference that page.. Oh yeah, good point. I'll probably do that then. Link to comment Share on other sites More sharing options...
Macrura Posted April 12, 2017 Share Posted April 12, 2017 cool, yeah i'm trying to sort out using images on the ProcessGeneralSettings module, and will be hopefully working out how to do this soon... 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now