Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

I'd like to allow the user to upload an image once, and have it apply to 3 other image fields on the same page without requiring the user to submit the form. Afterwards I intend to apply different croppings to each image but that may not be related to this question.

Is there an existing module or solution to this? If not, what is a good place to inject this behavior client side?

share|improve this question
1  
Why not just use one image field and show it's images in 3 places? –  David Thomas Jan 14 '13 at 9:51
    
Because there are 3 different cropping possibilities. The user is prompted to crop each image via the module Imagefield Crop 7.x-1.x (not 2.x) –  Dewayne Jan 15 '13 at 1:50
add comment

1 Answer

You should only use one image field, and then setup 3 image styles at:

admin/config/media/image-styles

For each image style you can define a number of different actions, like cropping. When displaying the image you can use theme_image_style()

This is a part of Drupal core and can be extended by e.g. ImageCache Actions.

share|improve this answer
    
This is not the correct answer because it needs to be a client side affect. –  Dewayne Jan 15 '13 at 1:48
    
Ok. You should state that in your question. And maybe, don't use the term "client side", as most developers will relate this to JavaScript. –  Martin Poulsen Jan 15 '13 at 13:33
    
I am referring to JavaScript. This is mentioned in two places in the question: "I'd like to allow the user to upload an image once, and have it apply to 3 other image fields on the same page without requiring the user to submit the form." and "Is there an existing module or solution to this? If not, what is a good place to inject this behavior client side?" –  Dewayne Jan 15 '13 at 21:17
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.