• n381

    (@n381)


    Hello, this plugin you created, is very useful, thank you.

    I’ve found plugin moves the thumbnails on creation to separate folder as described, still, the thumbnails are not being delivered from it’s new location, can you please advice how to have thumbnails and it’s paths updated within WordPress so the thumbnail images are utilized from that, separate folder.

    • This topic was modified 9 months ago by n381.
Viewing 1 replies (of 1 total)
  • Thread Starter n381

    (@n381)

    Hello, after checking through plugin files, i’ve found the function that is serving to modify the actual image paths

    public function modify_srcset_sources($sources, $size_array, $image_src, $image_meta, $attachment_id) {
    if (!isset($image_meta[‘sizes’])) {
    return $sources;
    }

        public function modify_srcset_sources($sources, $size_array, $image_src, $image_meta, $attachment_id) {
            if (!isset($image_meta['sizes'])) {
                return $sources;
            }
            
            foreach ($sources as $width => $source) {
                $basename = basename($source['url']);
                
                foreach ($image_meta['sizes'] as $size => $size_data) {
                    if (!isset($size_data['path']) || stripos($size_data['path'], $this->get_image_sizes_path($attachment_id, $size)) === false) {
                        continue;
                    }
            
                    if ($basename == $size_data['file'] && $url = $this->get_image_size_url($attachment_id, $size)) {
                        $sources[$width]['url'] = $url;
                

    “Still, it is not applying any changes on the website with custom upload dir.

    Should i edit the “$source[‘url’]” ?

    Please advice, thank you

    • This reply was modified 9 months ago by n381.
Viewing 1 replies (of 1 total)
  • The topic ‘Regarding plugin functioning’ is closed to new replies.