As users looking at styleguide may not be technical (I use it to help editors know what each style means) it would be useful to show what image style effects are in use, and what size the image is.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

malcomio’s picture

Status: Active » Needs review
FileSize
1.23 KB
dead_arm’s picture

Issue summary: View changes
Status: Needs review » Needs work

Thanks for the patch!

  1. +++ b/modules/image.inc
    @@ -18,9 +18,28 @@ function image_styleguide() {
    +        $effect_details .= t(', upscaling allowed');
    ...
    +        $effect_details .= t(' Height ') . $effect['data']['height'];
    ...
    +        $effect_details .= t(' Width ') . $effect['data']['width'];
    

    It's not good for translators to include spaces and punctuation like this.

  2. +++ b/modules/image.inc
    @@ -18,9 +18,28 @@ function image_styleguide() {
    +      $effect_details = '<em>' . $effect['label'] . '</em>';
    

    There are API functions to add em tags, and the label should be sanitized.

Additionally, this only covers one or two effects. It won't work for things like 'desaturate' or 'rotate', or any contrib effects.

tim.plunkett’s picture

Status: Needs work » Needs review
FileSize
1.21 KB

Image effects provide a summary functionality that can be used here.

dead_arm’s picture

Status: Needs review » Reviewed & tested by the community

Works for me.

dead_arm’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, committed!

  • Commit c108adf on 7.x-1.x authored by malcomio, committed by dead_arm:
    Issue #2035567 by tim.plunkett, malcomio: Image styles should tell the...

Status: Fixed » Closed (fixed)

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