Blog of King Software

Learn online with us in simple steps.

Configure JavaScript, CSS, Image settings and Enabling HTTPS in Magento 2


Created by Bhavesh Gohil & Dhruti Patel on Date: 05/07/2021

    Configure JavaScript settings in Magento 2

  • Configure your store’s JavaScript settings by going to Stores > Configuration (under Settings) > Advanced > Developer.
  • There, expand JavaScript Settings and change the value of Merge JavaScript Files, Enable JavaScript Bundling, Minify JavaScript Files to Yes:

  • SEO & DIGITAL MARKETING IN BARKING, Essex , London.-Kingsoftware

    Configuring CSS settings in Magento 2

  • The configuration settings for your CSS files are located under the JavaScript settings in the same screen.
  • Expand CSS Settings and change the values of Merge CSS Files and Minify CSS Files, and – if your theme supports this – set Use CSS critical path to Yes:

  • SEO & DIGITAL MARKETING IN BARKING, Essex , London.-Kingsoftware

    Configuring Image settings in Magento 2

  • Configure your image settings by going to Stores > Configuration (under Settings) > Advanced > System.
  • There, expand Images Upload Configuration at the bottom and change the values for Maximum Width and Maximum Height according to your preferences.
  • Example: the image dimensions in your template have a maximum width of 600 px and a maximum height of 300 px. In that case, you can set those sizes for the maximum width and height. If you also have support for retina screens, you can double the sizes, leading to a maximum width of 1200 px and a maximum height of 600 px.

  • SEO & DIGITAL MARKETING IN BARKING, Essex , London.-Kingsoftware

    Configuring Image Processing

  • Configure the Image Processing Adapter by going to Stores > Configuration (under Settings) > Advanced > Developer
  • There, expand Image Processing Settings and change the value of Image Adapter to ImageMagick. The ImageMagick adapter is considered the best adapter as it makes for the best quality images.
  • Be sure to flush the Catalog Images cache for this change to become active.
  • Enabling HTTPS in Magento 2

  • Configure your image settings by going to Stores > Configuration (under Settings) > General > Web.
  • There, expand Base URLs (Secure) and change the values of Secure Base URL and Secure Base Link URL so that they start with https.
  • Furthermore, change the value of the Use Secure URLs on Storefront, Use Secure URLs in Admin, Enable HTTP Strict Transport Security (HSTS) and Upgrade Insecure Requests fields to Yes.

  • SEO & DIGITAL MARKETING IN BARKING, Essex , London.-Kingsoftware