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;
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:
magento-1.9 product-images
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.
add a comment |
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:
magento-1.9 product-images
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
add a comment |
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:
magento-1.9 product-images
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:
magento-1.9 product-images
magento-1.9 product-images
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
add a comment |
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
add a comment |
1 Answer
1
active
oldest
votes
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.
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
add a comment |
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.
add a comment |
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.
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.
answered Jun 29 '18 at 17:33
JB1JB1
366
366
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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