Need to resize from code
-
Hello, I am in trouble here.
I need to resize images from code. In your troubleshoot i found a way that says to use the function imsanity_handle_upload($params). But does not work. Changes nothing and there is not way to see any kind of debbuging. It does not seem to be any kind of error, but does not work.
Is a sample of code out of wordpress, where i call it through require_once(wp-load.php). I think it is not influencing in nothing. Is a WPMU installation where the plugin works fine about the common way.
$targetPath =wp_upload_dir(); //4 //$name - file | $ds - directory separator $targetFile = $targetPath['path'].$ds. $name; move_uploaded_file($tempFile,$targetFile); //works fine $params['type'] = image_type_to_mime_type(exif_imagetype($targetFile)); $params['file'] = $targetFile; $params['url'] = $targetPath['url']."/".$name; imsanity_handle_upload($params);
Thanks in advance
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Need to resize from code’ is closed to new replies.