Save photos in news post
Posted
#5611
(In Topic #1304)
Standard member

Regarding the photos in news post, is it possible to auto save them in local server instead of remote URL once paste in the form & submitted ? at leaset you will have it on your server if the remote link removed .
Posted
Standard member

Posted
Site director

Go to Admin Zone > Tools > Commandr and enter this command exactly:
Code
:set_value('download_associated_media','1');
Code
:mkdir(get_file_base().'/uploads/external_media');
Code
clear_caches templates
You'll then find a new option has appeared on the posting forms that defaults to on, to download any images locally.
Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon
- If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
- If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
- If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
- If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Posted
Standard member

Perfect done,
But the size of the photos are same as originals, most of them are guge !
Any chance to optimize or decrease them before it saves in /uploads/external_media folder ?
Posted
Site director

It's hard to think how to approach that. We could implement a control on the UI to ask for the maximum size to resize to, but this makes things harder for the user for a feature that is meant to make things easier. We could add group settings for the size to resize to, but often the size you want is more to do with the situation than the permissions of the user posting it. We could not do the download if the size is too big. Neither of these seem perfect.
I suppose the best solution may be to change the download checkbox to a list with 4 options:
- Leave remote media as remote
- Download all remote media and limit maximum size to <configured maximum image size setting>
- Download all remote media smaller than <configured maximum image size setting> and leave the rest as remote
- Download all remote media and do not resize [option only there if you have a certain privilege]
I'll add a feature suggestion to the tracker.
Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon
- If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
- If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
- If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
- If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
1 guest and 0 members have just viewed this.

