file_styles_styles_styles() has this line:

$all_styles['image'] = $all_styles['file'];

Which results in styles_field_formatter_info() creating a formatter per image style for the image field type. But D7 image.module already provides a "Image" formatter with settings to select an image style. So the "Image Style ..." formatters are redundant and confusing to the user. The idea behind Styles module is to provide formatters for field types whose content can drive the details of how to display. So, for example, a File field can be displayed differently based on whether the actual file uploaded is an image or a video, and the core formatter system doesn't allow for that, and that's what Styles module is meant to address. But Image fields are constrained to be images, so they don't require this indirection. I think it makes sense to limit File Styles module to act on File fields only, and not on Image fields.

Thoughts?

CommentFileSizeAuthor
#4 924644-styles.patch1.45 KBeffulgentsia
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

aaron’s picture

that makes sense to me. in the early days of media development, we'd wanted to actually override images & file fields entirely, but scrapped that idea in favor of a new media entity. i suspect this was a remnant of that...

aaron’s picture

Status: Active » Fixed

should be ok now. thanks!

Status: Fixed » Closed (fixed)

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

effulgentsia’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Closed (fixed) » Needs review
FileSize
1.45 KB

Thanks. A little late, but here's an update function for it.

aaron’s picture

Status: Needs review » Fixed

committed. thanks effulgentsia!

Status: Fixed » Closed (fixed)

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