1

I have view that fetch content and I show it on a block. My view shows 16 nodes and each node has title, date and image. For images I use imagecache to get correct size image. I have set this image to use the imagecache preset on view field settings. But now, I would need that the 1st and 7th image are different size (other images are 300x300 but 1st & 7th should be 750x400). How can i do this? Is it possible to achieve somehow in views configuration or on template level? Its drupal 6.

  • Why not just use different views for the 1st and 7th? – pcambra Jun 29 '14 at 21:23
  • But then I would need to use 4 different views, right? One for the first, second for 2-6, third for 7 and fourth views for rest? Not sure how could I achieve this with separate views. – user33604 Jun 29 '14 at 21:33
  • If you build your page with panels, you can reuse your views and pass arguments so you've got two kind of views and invoke them several times. Another option is to do all this in the theming layer and invoke the imagecache settings programatically – pcambra Jun 29 '14 at 22:16
  • Use Group multiple values option - for details drupal.stackexchange.com/questions/102019/… and for your case create separate field for 1st and 7th field, set image style and for 2 to 6 create another field with default image style. – Bala Jun 30 '14 at 8:37
0

I used IMCE under Drupal 6.x. However, the resize only occurs at the time you upload and image with their editor which is cumbersome, to say the least. It depends on who has to upload the images, I guess.

Otherwise, CSS, as others mentioned, is probably your best bet. Now a day, browsers properly (cleanly) resize images so they still look good. (10 years ago, however, it was horrible!)

If you want to use IMCE and need to resize existing images, you could look into using convert on your server to resize existing files. However, you'll have to write an intelligent script that properly renames everything properly...

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.