Export images over WebDAV in Plone 5

Hello.
I would like to export folders with images from a Plone website (Plone version 5.1.5).
Now when I connect to Plone via webdav, I have access to the files. However, under Dexterity, content is transferred in RFC 2822 format.
But I need the images in the original format (mostly jpeg)
In the documentation of Dexterity I read that this behavior can be changed by the adapters IRawWriteFile and IRawReadFile.
But as far as I understand, this has to be done with coding.
Is there a way to export images in the original format from an existing Plone instance without coding?
With Archetypes it was possible to get images and files as binary files (.jpg, .pdf) and not the text representation as RFC 2822
Thank you vey much in advance

Long time (11 years) ago, I made a product that exported images.
I have not used it 'in ages', but it should probably still work (note the part in changelog about exporting scales / Desxterity, although from your question that does not matter (?)).

Thank you very much. But unfortunately I get the following error message when I install the package via buildout:

Traceback (most recent call last):
File "/home/paul/plone_sites/plone/zinstance/parts/instance/bin/interpreter", line 291, in
exec(compile(__file__f.read(), file, "exec"))
File "/home/paul/plone_sites/plone/buildout-cache/eggs/Zope2-2.13.27-py2.7.egg/Zope2/Startup/run.py", line 76, in
run()
File "/home/paul/plone_sites/plone/buildout-cache/eggs/Zope2-2.13.27-py2.7.egg/Zope2/Startup/run.py", line 22, in run
starter.prepare()
File "/home/paul/plone_sites/plone/buildout-cache/eggs/Zope2-2.13.27-py2.7.egg/Zope2/Startup/init.py", line 92, in prepare
self.startZope()
File "/home/paul/plone_sites/plone/buildout-cache/eggs/Zope2-2.13.27-py2.7.egg/Zope2/Startup/init.py", line 268, in startZope
Zope2.startup()
File "/home/paul/plone_sites/plone/buildout-cache/eggs/Zope2-2.13.27-py2.7.egg/Zope2/init.py", line 47, in startup
_startup()
File "/home/paul/plone_sites/plone/buildout-cache/eggs/Zope2-2.13.27-py2.7.egg/Zope2/App/startup.py", line 120, in startup
load_zcml()
File "/home/paul/plone_sites/plone/buildout-cache/eggs/Zope2-2.13.27-py2.7.egg/Zope2/App/startup.py", line 52, in load_zcml
load_site()
File "/home/paul/plone_sites/plone/buildout-cache/eggs/Zope2-2.13.27-py2.7.egg/Zope2/App/zcml.py", line 46, in load_site
_context = xmlconfig.file(site_zcml)
File "/home/paul/plone_sites/plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 651, in file
context.execute_actions()
File "/home/paul/plone_sites/plone/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 626, in execute_actions
callable(*args, **kw)
File "/home/paul/plone_sites/plone/buildout-cache/eggs/AccessControl-3.0.14-py2.7-linux-x86_64.egg/AccessControl/security.py", line 165, in protectClass
permission = getUtility(IPermission, name=permission_id)
File "/home/paul/plone_sites/plone/buildout-cache/eggs/zope.component-4.4.1-py2.7.egg/zope/component/_api.py", line 169, in getUtility
raise ComponentLookupError(interface, name)
zope.configuration.config.ConfigurationExecutionError: <class 'zope.interface.interfaces.ComponentLookupError'>: (, 'cmf.ManagePortal')
in:
File "/home/paul/plone_sites/plone/buildout-cache/eggs/medialog.imageexport-0.5-py2.7.egg/medialog/imageexport/browser/configure.zcml", line 7.7-12.9
<browser:page
name="image-export"
for="Products.CMFCore.interfaces._content.IFolderish"
class=".imageexport.Exporter"
permission="cmf.ManagePortal"
/>

I will try to look at it tomorrow, you could try to add this to the configure.zcml file.

<include package="Products.CMFCore" file="permissions.zcml" />

Thank you so much for your effort.
I added the line to configure.zcml file after running the buildout. It now works perfectly for folders with images.
That saves me so much time ....

I just tested it on Plone 5.2 / Python 3.

I did not need the 'extra line', but the zipping part has changed from Python 2 to 3, so it line 100 in imageexport.py needs to be changed to 'whatever the syntax for this is in python 3.

Can you check if it (still) works with collections ?
(collections changed from 4 to 5, so I am not sure if it does)

https://stackoverflow.com/questions/32131230/python-file-function

file -> open

$ python3
Python 3.7.3 (default, Jan 22 2021, 20:04:44) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> file = open
>>> file('/tmp/test.txt').read()
'test\n'
>>> 
$ python2.7
Python 2.7.16 (default, Oct 10 2019, 22:02:15) 
[GCC 8.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> file = open
>>> file('/tmp/test.txt').read()
'test\n'
>>>

So assigning open to file works both in python2 and python3.

This is an older instance runing under Plone-5.1.5 and Python 2.7.15 and was originally installed with the UnifiedInstaller under Linux.
I had to make the change to the configure.zcml file, without this change I get the error described above.
I made a test collection.
Unfortunately the export does not work for collections.
I get the error message "Site does not exist".

It gives me unicode error on python3. I will look into it if anyone is using this add-on

Sorry, I tested it with plain strings. I this sys.version_info is better to check the python version. Maybe the file must be opened in binary in python3?

>>> import sys
>>> sys.version_info
sys.version_info(major=3, minor=7, micro=3, releaselevel='final', serial=0)
>>> sys.version_info[0]
3
>>> 
$ python2.7
>>> import sys
>>> sys.version_info
sys.version_info(major=2, minor=7, micro=16, releaselevel='final', serial=0)
>>> sys.version_info[0]
2
>>>

Yes, that works ( but gives an error about file length when writing the zip, the header length is wrong / not same as file length )