• Resolved crying2812

    (@crying2812)


    Hi UsersWP, thank you for greate plugin. I used your plugin for years but today my website had an issue. The customer told me that their image is not displayed correctly when they changed image on iOS device. For details, they said image is rotated. Can you check the issue?
    Thank you for check my Topic.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi,

    I have tested with the iPhone and not able to regenerate the issue. Can you please provide your website URL or if possible then a small video or screenshot so that we can troubleshoot the issue?

    Regards,
    Patrik

    Thread Starter crying2812

    (@crying2812)

    Hi Patrik. I found the problem happened when user upload large image + system dont have any limit for image size. Thank you for quick reply.

    Hi,

    We have given setting for the lower limit of the image height and width of avatar and banner images but there is no upper limit but we have cropping functionality. If you can provide some steps to regenerate the issue then we can resolve it.

    Regards,
    Patrik

    Thread Starter crying2812

    (@crying2812)

    Hi Patrik.
    Here is all steps to solve my problem

    First. I added a filter to limit image size

     add_filter('wp_handle_upload', 'resize_for_new_uploads', 10, 2);
    
    function resize_for_new_uploads($array, $context)
    {
        $ok = array('image/jpeg', 'image/gif', 'image/png', 'image/jpg', 'image/jpg');
    
        if (!in_array($array['type'], $ok)) return $array;
    
        $editor = wp_get_image_editor($array['file']);
    
        if (is_wp_error($editor))
            return $editor;
    
        $editor->set_quality(90);
    
        $editor->resize(800, 800, true);
    
        $editor->save($array['file']);
    
        return $array;
    }
    

    Second, i disabled uwp_resizeThumbnailImage() in /includes/class-forms.php, change it to : $cropped = $image_url; on line 1351 on mobile.

    It happended when i take a photo using camera on Iphone or chosen some large images, my fix was rudimentary, but it solved my problem, hope this helps 🙂

    Hi,

    Thank you for your suggestions. We will surely look into this and apply the same in our plugin.

    Regards,
    Patrik

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Error rotate when crop image in profile page’ is closed to new replies.