It would be greate to have support for Devel generate.
Devel generate bulk generates nodes- greate for testing.
It doesn't seem to create image nodes properly at the moment.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joachim’s picture

I'll certainly commit a patch for this feature but I don't have the time to look into it myself.
In the meantime, you can always do what I saw David do at the sprint -- use image import to create a bunch of nodes.

alanburke’s picture

Assigned: Unassigned » alanburke

I'll have a look sometime.
It will be really useful when we get to testing the upgrade to D7.
Location module provides a separate module to do this - I'll look there for inspiration.

joachim’s picture

Status: Active » Needs work
FileSize
1.89 KB

I started looking at this today because I'm working on the 6-7 upgrade path.

However, it's more complex than seems at first, so I'm just going to do the image import trick for now :)

Here's my work so far in case anyone else wants to take it further.

awolfey’s picture

Version: 6.x-1.x-dev » 6.x-1.0-beta6
Assigned: alanburke » awolfey
Status: Needs work » Needs review
FileSize
1.37 KB

This will generate images and derivative sizes for the image node type when created by the devel_generate module.

It also attaches images to image_attach-enabled node types when they are created by devel_generate. A random number (up to the maximum specified in the type) of random images (selected from existing image nodes) are attached.

awolfey’s picture

FileSize
1.84 KB

One more change. This version will use random .jpg files in image_generate/images or if that is empty misc/druplicon.jpg.

jonathan1055’s picture

Version: 6.x-1.0-beta6 » 6.x-1.1

I copied the unzipped folder into /modules/image/contrib/ and tested it with image 6.x-1.1 and devel 6.x-1.x dev of 2010-12-08. It all seems to be working fine so far. I will post here if I find anything more to say!

This is very useful, thanks.

Jonathan

awolfey’s picture

If the image maintainers are interested I'm willing to release this and maintain it as a separate module.

jonathan1055’s picture

That's good for you to offer. I know that it can work as a separate module and be stored in the /modules/ directory but an alternative is to store it in /modules/image/contrib/ and be packaged as part of image automatically, which saves having to go and get another module. I presume you could still be responsible for maintaining it?

In D7, image has become part of core. I'm not sure exactly what implications that has for the decision on (a) how image_generate would be packaged and (b) how it is maintained.

It is definitely worth having though, in my opinion.

joachim’s picture

> In D7, image has become part of core.

It really hasn't. Another module in core has the same name, that is all.

I'd like to get input from the other maintainer on this before I add a new submodule to the project. @sun?

joachim’s picture

Version: 6.x-1.1 » 6.x-1.x-dev
Status: Needs review » Fixed
FileSize
4.84 KB

Well it's been 2 years (!!!) and no objections.

I find I need this now to generate content to test the Image upgrade migrations (see #513096: The Future of Image in Drupal 7).

Committing this patch, which has a few changes from the last upload:

- adapted code from Imagefield so that random images are generated
- removed functionality with the images subfolder: if you want to create nodes with specific images, use Image Import.
- code style cleanups
- changed module title to be clearer that it ties in with Devel module

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.