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
Why datecode is SO IMPORTANT to chip manufacturers?
How to write capital alpha?
Why are vacuum tubes still used in amateur radios?
Relating to the President and obstruction, were Mueller's conclusions preordained?
What does this say in Elvish?
Simple Http Server
How would you say "es muy psicólogo"?
What is the chair depicted in Cesare Maccari's 1889 painting "Cicerone denuncia Catilina"?
What is the difference between a "ranged attack" and a "ranged weapon attack"?
The test team as an enemy of development? And how can this be avoided?
What are the main differences between Stargate SG-1 cuts?
Why weren't discrete x86 CPUs ever used in game hardware?
Connecting Mac Book Pro 2017 to 2 Projectors via USB C
How were pictures turned from film to a big picture in a picture frame before digital scanning?
How do living politicians protect their readily obtainable signatures from misuse?
Central Vacuuming: Is it worth it, and how does it compare to normal vacuuming?
Moving a wrapfig vertically to encroach partially on a subsection title
"klopfte jemand" or "jemand klopfte"?
Is it dangerous to install hacking tools on my private linux machine?
What does 丫 mean? 丫是什么意思?
How can a team of shapeshifters communicate?
Resize vertical bars (absolute-value symbols)
How to ternary Plot3D a function
Understanding p-Values using an example
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♦ 3 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♦ 3 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♦ 3 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♦ 3 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