I would like to see this module integrate with drupal core's responsive images module. The drupal 7 version integrates with the picture module which is a back port of the responsive images module.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bloomt created an issue. See original summary.

amaria’s picture

Try this patch. In an effort not to create yet another module that has to be installed, this patch simply...

- adds one formatter trait for both normal and responsive images
- adds a responsive formatter that uses the above trait
- changes the normal formatter to use the above trait
- does not instantiate the responsive formatter if responsive image is not installed.
- removes some unused code that was leftover from Drupal 7 in flexslider fields module.

Let me know how it goes. Hopefully the patch works. I did it rather quickly.

EDIT: Be sure to rebuild the cache after installing.

amaria’s picture

Status: Active » Needs review
amaria’s picture

Here's a better patch that decouples the trait from the image formatters so it could potentially be used for other formatters.

amaria’s picture

  • amaria committed 2606ce7 on 8.x-2.x
    Issue #2665664 by amaria: Decouples the trait from image formatters.
    
  • amaria committed 35bd8b3 on 8.x-2.x
    Issue #2665664 by amaria: Adds a flexslider responsive field formatter.
    
amaria’s picture

Closing this since it has been added to the dev branch.

amaria’s picture

Status: Needs review » Closed (fixed)
bloomt’s picture

I updated to the latest dev release and noticed that there is a responsive image flexsider option of the manage display of a flexslider field. But from what I can tell there is still no way to tell flexslider to use responsive images in flexslider views or in a flexslider field within a view.

Thanks for all the hard work

amaria’s picture

You should see the Flexslider Responsive formatter for the image field in Views with the latest dev snapshot from yesterday. Are you not seeing it?

The only other way to use it in Views is to select Flexslider for the style, and Responsive image (instead of Image) for the image field formatter.

bloomt’s picture

I got it working, the issue that I was having was I was rewriting the images. Apparently responsive image style does not pass into rewrite, everything works properly when I do not use rewrite.

DD 85’s picture

del