Save photos in news post
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 .
Why not just attach the image. If you are using windows, in the explorer window just insert the http link to the image for the local path. This will automatically download the image to your computer and upload it.
There is an unofficial feature for it that needs to be enabled manually in Commandr.
Go to Admin Zone > Tools > Commandr and enter this command exactly:
then:
then:
You'll then find a new option has appeared on the posting forms that defaults to on, to download any images locally.
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.
Thanks Chris,
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 ?
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 ?
That's too much of an assumption for us to implement easily. If an admin is embedding a large desktop wallpaper for their users to download, it is very different from a naive user linking to a high-res digital camera image that doesn't need to be seen in full resolution.
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:
I'll add a feature suggestion to the tracker.
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.
5 guests and 0 members have recently viewed this.
