openeuropa / media_avportal

Media AV Portal adds European Audiovisual Services as a supported media provider.
4 stars 3 forks source link

OPENEUROPA-1844: Fixing AV Portal stream wrapper #19

Closed upchuk closed 5 years ago

upchuk commented 5 years ago

OPENEUROPA-1844

Description

The AV Portal stream wrapper used for generating image styles based in AV Portal photos did not work correctly for all photos. Some photos were fine while others were not. The issue was traced to the stream wrapper.

The solution (and improvement) is to use a contrib module called Remote Stream Wrapper which provides a good basis for extending our stream wrapper from. This uses Guzzle streams which does a lot of the heavy lifting. However, the module also makes an assumption we don't want: it prevents image styles from being generated for images that are not somehow managed. Which in our case is not ok because the AV portal photos are not treated as managed files. So I also made an issue and patch to make this assumption extensible for child stream wrappers: https://www.drupal.org/project/remote_stream_wrapper/issues/3050183