• I use the Smush plugin by WPMU DEV, which auto-compresses images to /wp-content/smush-webp/year/month/file-000×000.png.webp (WebP is optional).

    I understand that I can use a filter to modify filename selection. But can we modify the source folder from wp-content/uploads to something else?

    My goal is to select and copy into the Media Library, all files from that folder that are resized to -300×300.png.webp. Then I can attach files where required, as featured images, etc, and then delete the files that aren’t used.

    Can someone suggest a pattern, specific steps, to do this operation? … Or suggest code plugin code changes required to make this easier?

    I can easily just copy the files to uploads/smush… if that makes this easier.

    Thanks!

Viewing 1 replies (of 1 total)
  • Plugin Author erolsk8

    (@erolsk8)

    It is possible to modify the uploads folder and it’s the same as for native Media Library: define('UPLOADS', 'wp-content/something');.

    So this would change it for Media Library as well, and it would need to stay like that. I suppose if you define custom uploads dir, then import and then change uploads dir again, paths to imported files would be broken.

    Also, this plugin does not copy, move, or in any way modify any file. It only finds those files and creates database records for them (which makes them available in the Media Library).

Viewing 1 replies (of 1 total)
  • The topic ‘Using alternate source folder’ is closed to new replies.