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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Schnitzel’s picture

How 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?

salvis’s picture

I 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.

ipwa’s picture

Status: Active » Closed (works as designed)

@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.

ipwa’s picture

Status: Closed (works as designed) » Active

@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

akobashikawa’s picture

Title: Allow other modules to generate images for devel_generate » lorem pixum to generate images
Project: FileField » Devel
Version: 6.x-3.10 » 7.x-1.x-dev
Component: Code » devel_generate
FileSize
899 bytes

In 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.

ipwa’s picture

Title: lorem pixum to generate images » A allow other modules to generate images for devel_generate
Project: Devel » FileField
Version: 7.x-1.x-dev » 6.x-3.10
Component: devel_generate » Code

Changing the project to FileField, hopefully the maintainers will be open for this small change that would make this kind of modules possible.

ipwa’s picture

Title: A allow other modules to generate images for devel_generate » Allow other modules to generate images for devel_generate

typo

marvil07’s picture

Title: lorem pixum to generate images » Allow other modules to generate images for devel_generate
Project: Devel » FileField
Version: 7.x-1.x-dev » 6.x-3.x-dev
Component: devel_generate » Code
Status: Active » Reviewed & tested by the community

Patch 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

pcambra’s picture

Suscribe

quicksketch’s picture

Status: Reviewed & tested by the community » Closed (won't fix)

Devel 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.