Banner Logo

Be a part of the family: Connect, Receive Support,
Contribute, and Reap Abundant Rewards!

cropping and vendor banner size

WCMp Core

Resolved
Viewing 7 reply threads
  • Author
    Posts
    • #141792
      l.gan
      Participant

      Hello

      Can you please tell me how to make the .wcmp_bannersec_start element fill the entire width of the page? (without Borders)

      1. Now, the image is cropped to 1200×390 px.
      I need it not to be cropped to 1600×390 px.

      2. How can I load my vendor-cover-img in the dashboard?
      if my cropping is 1600 px, I would like to show that I need to load 1600 px and not 1200 px.

      Thanks

    • #141801

      Hi,

      >> please tell me how to make the .wcmp_bannersec_start element fill the entire width of the page?
      — for this you have to add custom css or maybe your theme use some css. Kindly share us the page so we will check this.

      1. you can change the crop dimension from below filter

      apply_filters('before_wcmp_crop_image_cropOptions_data', $crop_details_option, $attachment_id);
      Copy

      2. By default the width of the image is auto. kindly change the crop setting and let me know.

      Regards,

      • #141811
        l.gan
        Participant

        I searched for an answer in your site’s chat, and found that pruning information is passed in the plugin file: https://github.com/multivendorx/dc-woocommerce-multi-vendor/blob/master/classes/class-wcmp-library.php# L107

        class-wcmp-library.php
        line 107

        Can you please tell me if I can save this file with my cropping options in my child theme?

        I tried changing the parameters in the plugin itself – it worked.
        BUT
        When I tried to place the file in ../wp-content/themes/woodmart-child/dc-product-vendor/classes – but it doesn’t work.
        also at: ../wp-content/themes/woodmart-child/dc-product-vendor – but that doesn’t work either.

        How can I make these changes in a child theme? Thank you.

    • #141803
      l.gan
      Participant

      Thanks for the answer, but unfortunately I don’t know php.
      Could you share the complete code?

      at the expense of the image width: I corrected the code, everything is displayed correctly in width. But it’s muddy because its width is cropped to 1200 and my page width is 1470 px.
      http://pappel.store/vendor/vendorshop/

    • #141819

      Hi,
      Kindly add below code to your function.php then change the width as per your requirement.

      add_filter( 'wcmp_frontend_dash_upload_script_params', 'wcmp_custom_changes_of_image_script');
      function wcmp_custom_changes_of_image_script($image_script_params) {
      	 $image_script_params['cover_ratio'] = array(1200, 390);
      	return $image_script_params;
      }
      Copy

      Regards,

      • #141826
        l.gan
        Participant

        Thank you very much, it works and crops the image properly!

        But I have another question: I noticed that when loading an image to crop, I load:

        image size 3.8 mb., 2300×600.

        At the output, I get an image size of 84 KB and a crop of 1470×350 (the crop is correct and these are the parameters that I specified in the code)

        Can you please tell me if your plugin reduces (compresses) the image on upload?

        I have noticed that the images noticeably lose quality when uploading. And I decided to check it out by saving the web page to the desktop and opening the image. It turned out that it is compressed – perhaps that’s why the banner remains “cloudy” and has a fuzzy image.

        If compression occurs in a multi-vendor plugin, can I somehow influence this? Is there any code to remove this compression or make it not spoil the image quality?

        I have tried completely. disable cropping
        add_filter(‘wcmp_frontend_dash_upload_script_params’, ‘test_function’);
        function test_function( $image_script_params ) {
        $image_script_params[‘enableCrop’] = false;
        return $image_script_params;
        }

        – and then the picture is loaded with excellent quality. So the problem is somewhere in the cropping.

        P,S, I don’t have image compression plugins installed.
        If you need, I can provide an intermediate site for a test.

    • #141844

      Hi,
      Yes, cropping reduce the image quality.

      Regards,

      • #141845
        l.gan
        Participant

        Is it possible to uncompress an image but keep cropping?

        So that the image is cropped but the quality remains good?

    • #141881

      Hi,
      WCMp use default wordpress media library and also the media related function. So we can’t change the wordpress library functions.

      Regards,

    • #141882
      l.gan
      Participant

      Thank you my issue is resolved

    • #141919

      Thanks for the update @l.gan

Viewing 7 reply threads

The topic ‘cropping and vendor banner size’ is closed to new replies.