1

Let's say i have two node types:

  • Article - with 300x300 photo
  • News - with 100x100 photo

For now, i can define those two sizes in Image Styles menu and they'll be both created for both content types (so both Article and News will have two images generated - in size 300x300 and 100x100).

My question is - is there any way to set which content type shoud use which image style(s) ? Please note that i'm not interested in generating both of them and displaying just one. It would kill my server and my wallet (i'm using Amazon s3). Thanks in advance.

  • i think there is no way – monymirza Feb 5 '13 at 14:10
  • 1
    Does the setting on the content type's field display settings page not do this? I thought Drupal only generates styles when they're used somewhere. – beth Feb 5 '13 at 14:11
  • I dont think an image is generated using Image Styles Until it is called the first time to display in a page. – Mohammed Shameem Feb 5 '13 at 14:11
  • 1
    Derivative images won't be created until they are explicitly made to do so through code, or the style URL is requested. As long as you don't request the paths for the image styles you don't want to exist, they won't get created – Clive Feb 5 '13 at 14:12
  • oh right, i had no idea it works this way. Thank you for your help, please post this solution as a reply so i could mark it as accepted :) – bajki Feb 5 '13 at 14:22
1

The setting on the content type's field display settings page allows you to choose image style to display. Drupal only generates styles when they're used somewhere.

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.