Product Image Animated Gif - Reduce image size on Frontend (Magento 1.9.2.4 ) Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Storeviews not showing the same product image after importChange media image directory paththe very first item picture can't show MagentoGet Server Path of an Image by Product ID - Magento 1.8How to Display the Product Thumbnail Image in Admin FormGet the Product URL in the Custom Module Controller FileTransparency resizing Magento 1 Configurable SwatchesMagento - Use resize() function on written link of a imageperformance considerations for re-sizing product imagesMagento 1.9.2.4 cURL issue

Is CEO the "profession" with the most psychopaths?

Is multiple magic items in one inherently imbalanced?

What to do with repeated rejections for phd position

Relating to the President and obstruction, were Mueller's conclusions preordained?

License to disallow distribution in closed source software, but allow exceptions made by owner?

AppleTVs create a chatty alternate WiFi network

How could we fake a moon landing now?

Tips to organize LaTeX presentations for a semester

New Order #6: Easter Egg

What is the difference between CTSS and ITS?

Is there more forest in the Northern Hemisphere now than 100 years ago?

Why is std::move not [[nodiscard]] in C++20?

Universal covering space of the real projective line?

How does the math work when buying airline miles?

If Windows 7 doesn't support WSL, then what is "Subsystem for UNIX-based Applications"?

Test print coming out spongy

Flight departed from the gate 5 min before scheduled departure time. Refund options

Is there hard evidence that the grant peer review system performs significantly better than random?

How to force a browser when connecting to a specific domain to be https only using only the client machine?

What does this say in Elvish?

How much damage would a cupful of neutron star matter do to the Earth?

Why does electrolysis of aqueous concentrated sodium bromide produce bromine at the anode?

How to write capital alpha?

Is it dangerous to install hacking tools on my private linux machine?



Product Image Animated Gif - Reduce image size on Frontend (Magento 1.9.2.4 )



Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?Storeviews not showing the same product image after importChange media image directory paththe very first item picture can't show MagentoGet Server Path of an Image by Product ID - Magento 1.8How to Display the Product Thumbnail Image in Admin FormGet the Product URL in the Custom Module Controller FileTransparency resizing Magento 1 Configurable SwatchesMagento - Use resize() function on written link of a imageperformance considerations for re-sizing product imagesMagento 1.9.2.4 cURL issue



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








3















I was able to get Animated Gif images to show for products by doing this: Though your caching functionality will not work for animated gif image.



Copy file from




path : app/code/core/Mage/Catalog/Model/Product/Image.php




to




path : app/code/local/Mage/Catalog/Model/Product/Image.php




(create folders if necessary)
Find the line public function getUrl() and replace the function with:



public function getUrl()

$baseDir = Mage::getBaseDir('media');
$file = ('gif' == strtolower(pathinfo($this->_baseFile, PATHINFO_EXTENSION))) ? $this->_baseFile : $this->_newFile;
$path = str_replace($baseDir . DS, "", $file);
return Mage::getBaseUrl('media') . str_replace(DS, '/', $path);



This works great - except the now animated gifs that appear on the frontend are slightly bigger then the standard .jpg etc.... images that are already up in the product grid (and my recently added products area).



How can I get these to resize to match the appearance of the others?



I have searched and not been able to find an answer. I believe I see earlier on in the code where the image is resized but I am not sure how to get the animated Gif working and have it resize properly to match the other images appearance.



Any help would be appreciated!



Section of a screenshot - Top 6 Images are the Gifs:
ScreenShot










share|improve this question
















bumped to the homepage by Community 2 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • can you provide link or screenshot

    – Murtuza Zabuawala
    Aug 28 '16 at 1:30











  • Partial screen shot added to original post

    – Classic
    Aug 28 '16 at 2:20

















3















I was able to get Animated Gif images to show for products by doing this: Though your caching functionality will not work for animated gif image.



Copy file from




path : app/code/core/Mage/Catalog/Model/Product/Image.php




to




path : app/code/local/Mage/Catalog/Model/Product/Image.php




(create folders if necessary)
Find the line public function getUrl() and replace the function with:



public function getUrl()

$baseDir = Mage::getBaseDir('media');
$file = ('gif' == strtolower(pathinfo($this->_baseFile, PATHINFO_EXTENSION))) ? $this->_baseFile : $this->_newFile;
$path = str_replace($baseDir . DS, "", $file);
return Mage::getBaseUrl('media') . str_replace(DS, '/', $path);



This works great - except the now animated gifs that appear on the frontend are slightly bigger then the standard .jpg etc.... images that are already up in the product grid (and my recently added products area).



How can I get these to resize to match the appearance of the others?



I have searched and not been able to find an answer. I believe I see earlier on in the code where the image is resized but I am not sure how to get the animated Gif working and have it resize properly to match the other images appearance.



Any help would be appreciated!



Section of a screenshot - Top 6 Images are the Gifs:
ScreenShot










share|improve this question
















bumped to the homepage by Community 2 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • can you provide link or screenshot

    – Murtuza Zabuawala
    Aug 28 '16 at 1:30











  • Partial screen shot added to original post

    – Classic
    Aug 28 '16 at 2:20













3












3








3


1






I was able to get Animated Gif images to show for products by doing this: Though your caching functionality will not work for animated gif image.



Copy file from




path : app/code/core/Mage/Catalog/Model/Product/Image.php




to




path : app/code/local/Mage/Catalog/Model/Product/Image.php




(create folders if necessary)
Find the line public function getUrl() and replace the function with:



public function getUrl()

$baseDir = Mage::getBaseDir('media');
$file = ('gif' == strtolower(pathinfo($this->_baseFile, PATHINFO_EXTENSION))) ? $this->_baseFile : $this->_newFile;
$path = str_replace($baseDir . DS, "", $file);
return Mage::getBaseUrl('media') . str_replace(DS, '/', $path);



This works great - except the now animated gifs that appear on the frontend are slightly bigger then the standard .jpg etc.... images that are already up in the product grid (and my recently added products area).



How can I get these to resize to match the appearance of the others?



I have searched and not been able to find an answer. I believe I see earlier on in the code where the image is resized but I am not sure how to get the animated Gif working and have it resize properly to match the other images appearance.



Any help would be appreciated!



Section of a screenshot - Top 6 Images are the Gifs:
ScreenShot










share|improve this question
















I was able to get Animated Gif images to show for products by doing this: Though your caching functionality will not work for animated gif image.



Copy file from




path : app/code/core/Mage/Catalog/Model/Product/Image.php




to




path : app/code/local/Mage/Catalog/Model/Product/Image.php




(create folders if necessary)
Find the line public function getUrl() and replace the function with:



public function getUrl()

$baseDir = Mage::getBaseDir('media');
$file = ('gif' == strtolower(pathinfo($this->_baseFile, PATHINFO_EXTENSION))) ? $this->_baseFile : $this->_newFile;
$path = str_replace($baseDir . DS, "", $file);
return Mage::getBaseUrl('media') . str_replace(DS, '/', $path);



This works great - except the now animated gifs that appear on the frontend are slightly bigger then the standard .jpg etc.... images that are already up in the product grid (and my recently added products area).



How can I get these to resize to match the appearance of the others?



I have searched and not been able to find an answer. I believe I see earlier on in the code where the image is resized but I am not sure how to get the animated Gif working and have it resize properly to match the other images appearance.



Any help would be appreciated!



Section of a screenshot - Top 6 Images are the Gifs:
ScreenShot







magento-1.9 product-images






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 18 '18 at 8:48









Ylgen Guxholli

1,094415




1,094415










asked Aug 28 '16 at 0:19









ClassicClassic

10918




10918





bumped to the homepage by Community 2 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 2 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.














  • can you provide link or screenshot

    – Murtuza Zabuawala
    Aug 28 '16 at 1:30











  • Partial screen shot added to original post

    – Classic
    Aug 28 '16 at 2:20

















  • can you provide link or screenshot

    – Murtuza Zabuawala
    Aug 28 '16 at 1:30











  • Partial screen shot added to original post

    – Classic
    Aug 28 '16 at 2:20
















can you provide link or screenshot

– Murtuza Zabuawala
Aug 28 '16 at 1:30





can you provide link or screenshot

– Murtuza Zabuawala
Aug 28 '16 at 1:30













Partial screen shot added to original post

– Classic
Aug 28 '16 at 2:20





Partial screen shot added to original post

– Classic
Aug 28 '16 at 2:20










1 Answer
1






active

oldest

votes


















0














This is how I work with animated gifs.



When you upload an animated gif Magento converts it and re-names.



i.e. if you upload "photo.gif" it will now be "photo_1.gif"



Use an FTP Program to upload the original "photo.gif", but rename it to "photo_1.gif" and overwrite the smaller converted file.



The animated gif should work now. Size should also not be affected.






share|improve this answer























    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "479"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f133417%2fproduct-image-animated-gif-reduce-image-size-on-frontend-magento-1-9-2-4%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    This is how I work with animated gifs.



    When you upload an animated gif Magento converts it and re-names.



    i.e. if you upload "photo.gif" it will now be "photo_1.gif"



    Use an FTP Program to upload the original "photo.gif", but rename it to "photo_1.gif" and overwrite the smaller converted file.



    The animated gif should work now. Size should also not be affected.






    share|improve this answer



























      0














      This is how I work with animated gifs.



      When you upload an animated gif Magento converts it and re-names.



      i.e. if you upload "photo.gif" it will now be "photo_1.gif"



      Use an FTP Program to upload the original "photo.gif", but rename it to "photo_1.gif" and overwrite the smaller converted file.



      The animated gif should work now. Size should also not be affected.






      share|improve this answer

























        0












        0








        0







        This is how I work with animated gifs.



        When you upload an animated gif Magento converts it and re-names.



        i.e. if you upload "photo.gif" it will now be "photo_1.gif"



        Use an FTP Program to upload the original "photo.gif", but rename it to "photo_1.gif" and overwrite the smaller converted file.



        The animated gif should work now. Size should also not be affected.






        share|improve this answer













        This is how I work with animated gifs.



        When you upload an animated gif Magento converts it and re-names.



        i.e. if you upload "photo.gif" it will now be "photo_1.gif"



        Use an FTP Program to upload the original "photo.gif", but rename it to "photo_1.gif" and overwrite the smaller converted file.



        The animated gif should work now. Size should also not be affected.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jun 29 '18 at 17:33









        JB1JB1

        366




        366



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Magento Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f133417%2fproduct-image-animated-gif-reduce-image-size-on-frontend-magento-1-9-2-4%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Nissan Patrol Зміст Перше покоління — 4W60 (1951-1960) | Друге покоління — 60 series (1960-1980) | Третє покоління (1980–2002) | Четверте покоління — Y60 (1987–1998) | П'яте покоління — Y61 (1997–2013) | Шосте покоління — Y62 (2010- ) | Посилання | Зноски | Навігаційне менюОфіційний український сайтТест-драйв Nissan Patrol 2010 7-го поколінняNissan PatrolКак мы тестировали Nissan Patrol 2016рвиправивши або дописавши її

            Best approach to update all entries in a list that is paginated?Best way to add items to a paginated listChoose Your Country: Best Usability approachUpdate list when a user is viewing the list without annoying themWhen would the best day to update your webpage be?What should happen when I add a Row to a paginated, sorted listShould I adopt infinite scrolling or classical pagination?How to show user that page objects automatically updateWhat is the best location to locate the comments section in a list pageBest way to combine filtering and selecting items in a listWhen one of two inputs must be updated to satisfy a consistency criteria, which should you update (if at all)?

            Перекидне табло Зміст Переваги | Недоліки | Будова | Посилання | Навігаційне менюПерекидне таблоU.S. Patent 3 220 174U.S. Patent 3 501 761Split-flap-display