• Resolved nafisehofoghi

    (@nafisehofoghi)


    hi,
    I have a problem with vendor avatar and banner setting. Vendor uploads an image as her avatar, some images are ok but with some others the cropping rectangle is not shown and an error is generated that the image cannot be cropped. I tried many different images with different scales but could not find the reason. any clue? could you make a reference to the file that is responsible for this section?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi @nafisehofoghi

    That might be happening because of higher resolution images as default the image will be cropped into a 1:1 ratio or square shape. You can try to figure out the issue by testing the code and the related functions that can be found via below file path,

    File Path: /wp-content/plugins/dokan-lite/templates/settings/
    File Name: store-form.php
    Line Number: 115

    You can contact us here for further discussion.

    Thread Starter nafisehofoghi

    (@nafisehofoghi)

    Thanks @shafinahmad01 for your reply.

    Actually it also has problem with lower resolutions, I guess the scale is more important than the resolution (for both avatar & cover).
    I checked the path you mentioned, that’s the code representing the setting form (front). I need access to the code dealing with cropping thing. could you provide me with that path too?

    Thanks

    • This reply was modified 2 years, 11 months ago by nafisehofoghi.

    Hi @nafisehofoghi

    You can have a look at the below file path where you might find the related files and functions,

    File Path:/dokan-lite/includes/
    File Name: Assets.php

    Screenshot: https://prnt.sc/15i00sk

    Thank you!

    • This reply was modified 2 years, 11 months ago by Shafinoid.
    Thread Starter nafisehofoghi

    (@nafisehofoghi)

    Hi @shafinahmad01 ,

    Thanks for your reply. The lines you mentioned are ok, they get the width and height of the banner from dokan settings as bellow:

    $banner_width    = dokan_get_vendor_store_banner_width();
    $banner_height   = dokan_get_vendor_store_banner_height();

    I think the problem comes from cropping section , as it has bugs with avatar pic. too. Where can I find the file responsible for cropping images in Dokan or WordPress? Could you help me with that?

    I appreciate your help

    Hi @nafisehofoghi,

    To fix the cropping issue, please install the Enable jQuery Migrate Helper plugin and choose the jQuery Version: Legacy 1.12.4-wp from the WordPress Dashboard > Tools > jQuery Migrate screen.

    Thanks!

    Thread Starter nafisehofoghi

    (@nafisehofoghi)

    Thanks @tanjiralmamun,

    That solved my problem ??

    • This reply was modified 2 years, 10 months ago by nafisehofoghi.
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘problem with avatar and banner image cropping’ is closed to new replies.