Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nicholas.alipaz created an issue. See original summary.

nicholas.alipaz’s picture

Adding a patch. This works for me. Creates a new formatter called Responsive image that allows selecting a responsive image style.

joco_sp’s picture

The patch didn't work for me, because \ImageFormatter::__construct() on line 85 wasn't right. Probably because of the core update or something. I added the missing arguments and updated it a little bit.
When I've done this, the patch works.

The updated patch is attached.

s_leu’s picture

The previous patch was yet lacking support for linking the image to the file, I've added this now. Also fixed some related stuff in the defaultSettings() method. Didn't find a way to create a link to the entity which is referring to the file so I removed that option, anyway is there any way at all besides entity queries?

Status: Needs review » Needs work

The last submitted patch, 4: file_entity-responsive_image_styles-2723543-4.patch, failed testing.

The last submitted patch, 4: file_entity-responsive_image_styles-2723543-4.patch, failed testing.

s_leu’s picture

esolitos’s picture

Status: Needs review » Reviewed & tested by the community

Have been using in production for almost a year, zero issues.

The last submitted patch, 2: responsive-image-styles-2723543-1.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

  • s_leu authored dffa222 on 8.x-2.x
    Issue #2723543 by s_leu, nicholas.alipaz, joco_sp: Responsive image...
joseph.olstad’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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