Using $_FILES variable into the same function for uploading images and files

I did override something. I did not validation and only build structured to validation and upload function. You can validate file as you needed. if ($_FILES) { // Get the upload attachment files $images = $_FILES[‘moreimages’]; $errors=””; foreach ($images[‘name’] as $key => $value) { if ($images[‘name’][$key]) { $image = array( ‘name’ => $images[‘name’][$key], ‘type’ => … Read more

Why I am not able to upload media files?

Put this is your themes function.php add_filter( ‘wp_image_editors’, ‘change_graphic_lib’ ); function change_graphic_lib($array) { return array( ‘WP_Image_Editor_GD’, ‘WP_Image_Editor_Imagick’ ); }

Images not aligning correctly

Assuming this is implemented using image size feature what you want is so-called “hard crop” mode. That will make image fit dimensions exactly, possibly cutting of their parts. What you seem to have is soft/proportional crop mode, which tries to fit image in roughly into dimensions, while preserving all of image. See crop mode in … Read more