New Feature No Code Attached Yet
avatar korenevskiy
korenevskiy
25 Apr 2020

90% of all sites on the Internet contain optimized images for site design, while the same 90% of sites contain non-optimized images in articles and news. in Other words, 90% of sites have poor content in terms of displaying images.
Loading site design ~500 KB., and loading content with 2-3 photos 3-5Mb.
This problem affects almost all sites.
People who create content are not experts in site optimization. Moreover, the people who create content are specialists in a completely different field: doctors, carpenters, locksmiths, artists, teachers, educators, physicists, chemists ......
These people post articles because they can post them and they need it for their work.
The second problem is that even if a person knows about the need to optimize photos, they simply do not have the tools to optimize them. At the same time, the image editor built into Windows 10 does not have the ability to optimize in a clear way. The built-in image editor can crop and zoom out, but the user has no idea whether the image has shrunk enough or not.

.

  1. I Suggest to build a plugin that will change the size of images on the fly in the likeness of the plugin "ImageSizer free". To enable the plugin by default in the CMS.
  2. I also Offer a function for transliterating the file name and adding a suffix to the downloaded files. The suffix contains the date, material ID, and its name. Of course, the format should be able to change.
    Users have no idea what is happening when uploading a photo DC001.jpg can replace another file of the same name. And especially the user who uses the Drag InDrop function should not worry about it.

PS

With the mass epidemic, the question of switching to online mode is even more difficult for people.
My wife works as a Museum employee. Exactly a month ago, she started working remotely. It used to work with people, now it works with content on the site.
For sites of museums, exhibitions, teachers, educators, it is only now that there is an urgent need to be editors of the site and post photos.
At the moment, the CMS is not adapted to solve the problems of people just creating content.

avatar korenevskiy korenevskiy - open - 25 Apr 2020
avatar joomla-cms-bot joomla-cms-bot - change - 25 Apr 2020
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 25 Apr 2020
avatar korenevskiy korenevskiy - change - 25 Apr 2020
The description was changed
avatar korenevskiy korenevskiy - edited - 25 Apr 2020
avatar korenevskiy korenevskiy - change - 25 Apr 2020
The description was changed
avatar korenevskiy korenevskiy - edited - 25 Apr 2020
avatar korenevskiy korenevskiy - change - 25 Apr 2020
The description was changed
avatar korenevskiy korenevskiy - edited - 25 Apr 2020
avatar korenevskiy korenevskiy - change - 25 Apr 2020
The description was changed
avatar korenevskiy korenevskiy - edited - 25 Apr 2020
avatar korenevskiy korenevskiy - change - 25 Apr 2020
Title
[J4] Please Add plugin Resize image for upload image, add auto rename image for upload.
[J4][J3] Please Add plugin Resize image for upload image, add auto rename image for upload.
avatar korenevskiy korenevskiy - edited - 25 Apr 2020
avatar ReLater
ReLater - comment - 25 Apr 2020

Due to J4:
An auto resize plugin does already exist in Joomla 4.
but not perfect because of the quality aspect: See #26511

To enable the plugin by default in the CMS.

I think destructive features shouldn't generally be enabled by default. It's activated in J4 but you have to enter the sizes first.

avatar korenevskiy
korenevskiy - comment - 27 Apr 2020

Please add the file renaming code to the image editing plugin.
I used to write myself a plugin J3 for renaming uploaded photos.
So that test editors and creators of unique content don't have problems with photo names when they suddenly have the same file name.
To prefix the file name with the date and material ID.
So that everything happens automatically.

use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\Plugin\CMSPlugin as JPlugin;
class plgSystemImageRename extends JPlugin {
    public function __construct(&$subject, $config=array()) 

        $image_rename = $this->params->get("image_auto_rename",FALSE);            
        if(empty($image_rename))            return; 

        $this->input = JFactory::getApplication()->input; 
	$files2        = $this->input->files->get('Filedata', array(), 'array');     

        if(empty($files2) && empty($_FILES['Filedata']))            return;
           
        if(is_array($_FILES['Filedata']['name'])){// && isset($file['name'])
            foreach ($_FILES['Filedata']['name'] as $i => &$file)
                $_FILES['Filedata']['name'][$i] = $this->getNewName($_FILES['Filedata']['name'][$i]);
        }
        elseif(is_string($_FILES['Filedata']['name'])){
            $_FILES['Filedata']['name'] = $this->getNewName($_FILES['Filedata']['name']);
        }
            
        if(empty($files2))                return;
            
        if(isset($files2['name'])){
             $files2['name'] = $this->getNewName($files2['name']);
        }
        elseif (isset($files2[0]['name'])) {
            foreach ($files2 as $i => &$file)
                $file['name'] = $this->getNewName($file['name']);
        }
    }
    public function getNewName($str = ''){ 
        $image_date_rename = $this->params->get("image_date_rename",FALSE);
        $image_format_rename = $this->params->get("image_format_rename","Ymd_");
            if($image_date_rename == 2 && $image_format_rename)
                $str = date($image_format_rename).$str;
            elseif($image_date_rename)
                $str = date("Ymd_").$str;
            $str = str_replace(' ', '_', $str);
            $str = str_replace('-', '_', $str);
            $str = JFactory::getLanguage()->transliterate($str);  
            return $str;
    }
}
avatar SharkyKZ SharkyKZ - change - 21 May 2020
Labels Added: New Feature
avatar SharkyKZ SharkyKZ - labeled - 21 May 2020

Add a Comment

Login with GitHub to post a comment