Plone 5 Image rotation - On Facebook they rotate!

Thanks @Alexander_Loechel,
:clap: :tada: , I'm assuming it's safe to pin the new version of plone.namedfile on older Plone sites once that comes out.

The patch itself is safe, I do not know about other features like the svg scales or retina images. Which might have been introduced in the versions in between your current and the new one.

@Alexander_Loechel yes there are definitely other issues, like the retina_scales problem.

On both plone 5.0.6 and 5.1b2 plone.namedfile 4.2.1 dev results in the following error when attempting to view a folder listing of images:

AttributeError: retina_scales

Here's the full traceback of an album view on plone 5.1b2

Traceback (innermost last):
  Module ZPublisher.Publish, line 138, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 48, in call_object
  Module Products.Five.browser.metaconfigure, line 485, in __call__
  Module Products.Five.browser.pagetemplatefile, line 125, in __call__
  Module Products.Five.browser.pagetemplatefile, line 59, in __call__
  Module zope.pagetemplate.pagetemplate, line 132, in pt_render
  Module five.pt.engine, line 98, in __call__
  Module z3c.pt.pagetemplate, line 163, in render
  Module chameleon.zpt.template, line 261, in render
  Module chameleon.template, line 191, in render
  Module chameleon.template, line 171, in render
  Module 2c8c7e7b7613f90a1ea561a8bf79e8e3.py, line 982, in render
  Module 8f34801d897b8e9359e880ab0c38e891.py, line 1223, in render_master
  Module 8f34801d897b8e9359e880ab0c38e891.py, line 420, in render_content
  Module 2c8c7e7b7613f90a1ea561a8bf79e8e3.py, line 970, in __fill_content_core
  Module 2c8c7e7b7613f90a1ea561a8bf79e8e3.py, line 123, in render_content_core
  Module 2c8c7e7b7613f90a1ea561a8bf79e8e3.py, line 245, in render_listing
  Module plone.namedfile.scaling, line 440, in scale
  Module plone.namedfile.scaling, line 460, in calculate_srcset
  Module plone.namedfile.scaling, line 384, in getRetinaScales
  Module plone.namedfile.utils, line 274, in getRetinaScales
  Module plone.registry.recordsproxy, line 49, in __getattr__
AttributeError: retina_scales

 - Expression: "python:scale.scale('image', scale='thumb')"
 - Filename:   ... lone/app/contenttypes/browser/templates/listing_album.pt
 - Location:   (line 28: col 27)
 - Source:     img_tag python:scale.scale('image', scale='thumb')">
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 - Arguments:  repeat: {...} (0)
               template: <ViewPageTemplateFile - at 0x7fa4c277e750>
               views: <ViewMapper - at 0x7fa4c2793fd0>
               modules: <instance - at 0x7fa4cc46ce18>
               args: <tuple - at 0x7fa4d401e050>
               here: <ImplicitAcquisitionWrapper Plone9 at 0x7fa4c5b2a8c0>
               user: <ImplicitAcquisitionWrapper - at 0x7fa4c6115910>
               nothing: <NoneType - at 0x91dfd0>
               container: <ImplicitAcquisitionWrapper Plone9 at 0x7fa4c5b2a8c0>
               request: <instance - at 0x7fa4c2998dd0>
               wrapped_repeat: <SafeMapping - at 0x7fa4c28ac418>
               traverse_subpath: <list - at 0x7fa4c2d1d8c0>
               default: <object - at 0x7fa4d3f3c510>
               loop: {...} (1)
               context: <ImplicitAcquisitionWrapper Plone9 at 0x7fa4c5b2a8c0>
               view: <SimpleViewClass from /home/dbain/plone/buildout-cache/eggs/plone.app.contenttypes-1.2.22-py2.7.egg/plone/app/contenttypes/browser/templates/listing_album.pt album_view at 0x7fa4c277ef90>
               translate: <function translate at 0x7fa4c29680c8>
               root: <ImplicitAcquisitionWrapper Zope at 0x7fa4c2772f50>
               options: {...} (0)
               target_language: <NoneType - at 0x91dfd0>