Black Friday Sale

Blog

  1. How to Exclude Some Image Tags from WebP Conversion

    Optimizing images is one of the first steps to website performance improvement. The best way to do that is to convert images to the modern WebP format with the Magento 2 WebP Images extension. WebP images are smaller in size from traditional .png and .jpg formats and that makes them load faster.

    However, sometimes there might be images you want to exclude from the WebP conversion.

    You have converted images to WebP format manually or just want some <img> tags to be ignored during WebP conversion? Please, add the data-webpconverted="1" attribute to the <img> tag as in the example. 

    Example:

    <img src="image.jpg" />     —>    <img src="image.jpg" data-webpconverted="1" />

    Thus, once y

    Read more »
  2. We are delighted to announce that we will be a Silver Sponsor of MageCONF 2020!

    This year Magefan is proud to be among the Silver Sponsors of an online MageCONF that will take place on October 24, 2020.

    Mageconf 2020 is a must-attend online conference that allows you to dive into the world of unique shared experience presented by Magento expert agencies, service providers and developers, learn about the latest eCommerce trends and innovations.

    Register now for free. Don’t miss it!

    MageConf 2020 Agenda

    Read more »
  3. Amasty Shopby breaks the Magefan Blog Featured Images Uploading

    In case you use one of the Amasty extensions, e.g. Amasty Layered navigation, you may face the issue of the broken blog featured images after the upload.

    We have found the issue in Amasty_Shopby extensions, that breaks some other extensions using image upload functionality, including our Magento 2 Blog Extension.

    Amasty_Shopby in this file:

    app/code/Amasty/Shopby/etc/adminhtml/di.xml

    adds the plugin to Magento\Catalog\Model\ImageUploader model.

    Judging from the code in the following file:

    app/code/Amasty/Shopby/Plugin/Catalog/Model/ImageUploaderPlugin.php

    it looks like some fix Amasty added for Magento 2.3.4. and the issue lies in the plugin beforeMoveFileFromTmp.

    The original Magento MoveFileFromTmp

    Read more »
  4. How to debug 301/302 redirect in Magento 2?

    If you face an unexpected 301 or 302 redirect in Magento 2 and you don't know why it happens or what code causes it, you can easily find this out by temporarily editing the following files:

    /vendor/magento/framework/HTTP/PhpEnvironment/Response.php
    /var/www/html/m2_35ee/vendor/magento/framework/Controller/Result/Redirect.php

    Open Response.php and add the following line to the beginning of the setRedirect function:

    var_dump($url); \Magento\Framework\Debug::backtrace(false, true, false); exit();

    Example:

    public function setRedirect($url, $code = 302)
    {
        var_dump($url); \Magento\Framework\Debug::backtrace(false, true, false); exit();
        $this->setHeader('Location', $url, true)
            ->setHttpResponseCode($code);
    Read more »
  5. Debugging PHP Infinite loop in Magento 2

    There are situations in Magento 2 when page keeps loading and then you get 500 fatal error, memory limit, or timeout error. This is an infinite loop in the PHP code, when the same code is executed over and over again. It is related to some core Magento issues or, most likely, third party extension.

    To debug an infinite loop and find the loop entrance, please follow the steps below:

    1. Open the app/bootstrap.php file and add this code right after PHP open tag <?php in the next line

    $_SERVER['MAGE_PROFILER'] = 'html';

    2. Open the vendor/magento/framework/Profiler.php file and add this code to the beginning of "public static function start($timerName, array $tags = null)" function, e.g.

    Read more »
  6. Debug Backtrace in Magento 2

    In case you work with a lot of different Magento instances as a temporary project you might want to have a nice method to check debug backtrace of some function execution in Magento 2 quickly without installing or enabling additional software on the server, e.g. Xdebug.

    In this case, you can use the native Magento backtrace function from \Magento\Framework\Debug class and call it whenever you need:

    \Magento\Framework\Debug::backtrace(false, true, false);

    As a result, you will get this nice HTML debug-backtrace:

    Magento 2 Debug Backtrace

    Read more »
  7. Magefan News and Updates - August 2020

    Hello there, Magento fans!

    Summer is hot this year the same as the extension updates we've prepared for you. Are you ready?

    Read more »
  8. Serve Images In Next-Gen Formats on Magento Website

    Page Speed is taken very seriously by a lot of Magento stores since it directly influences your general website performance. That's why everyone constantly tries to improve it and looks for the best ways to do so. 

    In case you're checking your website speed in Google PageSpeed you can face the Serve images in next-gen formats issue. According to it, Google recommends you to save images in JPEG 2000, JREG XR and WEBP formats instead of old PNG and JPG. 

    Serve Images in Next Gen Formats in Magento

    Read more »
  9. Magefan Login as Customer Extension Now Is a Part of Magento 2.4.0 Core

    Hello, Magento fans!

    Since Magento is our favorite eCommerce platform and we all eagerly waited for Magento 2.4.0 we are happy to bring you the great news.

    In the fall of 2019, we received a request from Adobe Systems Incorporated, which owns the Magento platform, to include our Login as Customer module for Magento 2 in the core of their system. Of course, we couldn't refuse, because Magefan is Magento fans.

    Login as Customer functional is a valuable contribution to any Magento 2 store. It did a great impact on Magento Community and that was why Magento got interested in adding it to the Magento 2.4.0 functional. 

    Instead of writing new code from scratch Magento contacted us and asked about the integration which we definitely supported.

    We transferred copyright for the "Login as Customer" extension to Adobe, and in the early 2020 we worked with the Magento Community Engineering Team on integrating our module into the Magento core. There were made code improvements and added some new features.

    Read more »
  10. Top 3 Tips for Magento 2 Image Optimization

    While everyone so desperately tries to make their way up to the top of SERP and improve SEO they pay little or no attention to one of the main things page speed could be improved with - Image Optimization. In order to get more traffic, you need to take care of plenty of things including website performance influenced by images.

    Many websites use outdated unoptimized images which definitely are not contributing to the website speed improvement since they take some time to load. It's been said that if the page takes longer than 3 seconds to load the majority of people are going to leave. In case you really want to attract more customers with the fast performing website you need to optimize your images.

    We've prepared the top 3 tips for your Magento 2 Image Optimization.

    Read more »
Posts loader
^Top
Chat