1

Is there a way to take multiple style image for one image field?
I want to use a 150×150, 180×180, and a 300×300 style at the same time.

4

If I understand your question correctly, you'll want to use the ImageCache module. This is in core as of Drupal 7. Try the documentation for Drupal 6 and/or this screencast if you need help understanding how to use this module.

  • no its not like that. first i use drupal 7 what i want to take 3 different style for image lets say 1- 150×150 (style A) 2- 180×180 (style C) 3- 300×300 (style D) and i want these to happen to 1 image field without make 3 image fields and assign each one for one different style . do u got me ? – mohamad salama Apr 10 '11 at 18:19
  • @mohamad-salama that's how ImageCache works. You'll still have the one Field for images, there will just be multiple imagecache presets. – Daniel Nitsche Apr 10 '11 at 23:47
2

You can manually call the image caches either in your template file or create them in hook_preprocess_node(&$vars). You can get the image with theme_image_style($vars). There are some useful comments in the docs for theme_image_style.

1

And once you've created the imagecache presets, they will then show up as field formatters for your teaser and node display settings as well as in views.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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