8000 please change the following in the optimizeAfterUpload function · Issue #1 · fafiebig/faf-optim · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Mar 16, 2023. It is now read-only.
This repository was archived by the owner on Mar 16, 2023. It is now read-only.
please change the following in the optimizeAfterUpload function #1
Open
@ash2osh

Description

@ash2osh

function optimizeAfterUpload( $data )
{

if (get_option('autoopt') === 'yes') {
    $path   = wp_upload_dir();
	$base_dir = $path['basedir'];
    $dir    = $path['path'];
    $sizes  = getSizes();
	
	//optimize orig
	$orig = $base_dir.'/'.$data['file'];
	 optimizeImage($orig);

    foreach ($sizes AS $size) {
		echo $size;
        if (get_option($size) === 'yes' && isset($data['sizes'][$size]['file'])) {
            $file = $dir.'/'.$data['sizes'][$size]['file'];
			echo $file;
            optimizeImage($file);
        }
    }
}

return $data;

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      2A10
      0