Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hey guys, I love devel_generate and use it very often, its an awesome module. It would be really cool if there was an option to use lorempixum to generate images. I know there is a patch for Dummy image to have this option, wanted to know if you guys might be interested in having this feature. I'm willing to help out.
Cheers
Comment | File | Size | Author |
---|---|---|---|
#5 | fieldfield_image_generator_function-1134986-4511674.patch | 899 bytes | akobashikawa |
Comments
Comment #1
Schnitzel CreditAttribution: Schnitzel commentedHow you think to do it? Copy the Images from LoremPixum and save them in the local Drupal? Or just create fake Images, which are not available and then Dummy Images jumps in?
Comment #2
salvisI don't think we'd want to add a dependency to an external website to Devel.
Creating an add-on module would be the way to go.
Comment #3
ipwa CreditAttribution: ipwa commented@Schnitzel That's a good idea, my original idea was to have 'fake' images.
@salvis I know what you mean. An add on module would be really cool, but Schnitzel made me realize it wasn't going to be as easy as I originally thought. Will try to get around doing this at some point as I get more familiarized with fields in Drupal7, I'll comment back if/when the add-on module gets created.
Cheers.
Comment #4
ipwa CreditAttribution: ipwa commented@akobashikawa worked on this at the Drupal Peru code sprint: http://groups.drupal.org/node/144524
He has a working module on his sandbox, but we need a small patch for filefield for this to work properly.
http://drupal.org/sandbox/rulokc/1166830
Comment #5
akobashikawa CreditAttribution: akobashikawa commentedIn filefield/filefield.devel.inc, _filefield_generate_file() invokes _filefield_generate_image() to generate dummy images.
This patch shows a way to allow other modules participate. Basically, setting a variable wich value could be a function name replacement of _filefield_generate_image.
It is for Drupal6. I hope it helps in Drupal7 too.
Comment #6
ipwa CreditAttribution: ipwa commentedChanging the project to FileField, hopefully the maintainers will be open for this small change that would make this kind of modules possible.
Comment #7
ipwa CreditAttribution: ipwa commentedtypo
Comment #8
marvil07 CreditAttribution: marvil07 commentedPatch looks clean and retain current behaviour on generating files by default, so marking as RTBC.
Also moving to -dev, but since 3.10 tag is now on the tip of 6.x-3.x branch, it's the same. Only trying to say patch works on the top of 6.x-3.x
Comment #9
pcambraSuscribe
Comment #10
quicksketchDevel has just incorporated the file generation code into its own module now in D7. There's little or no point in adding new functionality to FileField at this point.