Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
This should work with D8's responsive image styles, but currently the "File image" formatter only shows a list of regular image styles.
Comments
Comment #2
nicholas.alipaz CreditAttribution: nicholas.alipaz at L.A. BioMed commentedAdding a patch. This works for me. Creates a new formatter called Responsive image that allows selecting a responsive image style.
Comment #3
joco_sp CreditAttribution: joco_sp commentedThe 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.
Comment #4
s_leu CreditAttribution: s_leu as a volunteer commentedThe 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?
Comment #7
s_leu CreditAttribution: s_leu as a volunteer commentedComment #8
esolitosHave been using in production for almost a year, zero issues.
Comment #11
joseph.olstad