Get product image cache path sql Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Get original image file from a cache URLProduct Image Cache - Image ResizingSave image cache on CDN or turn image cache offHow do I add Product Images as URL instead of uploading them in Magento?Programmatically clean product image cache singularlyMagento cache showing old product images on page zoomProblem with product image cache after upgradeMagento2 Display extra product image in product pageMagento is duplicating imagesMagento2: How to disable product image cache url?What is the use of Magento 2.2.6 product image cache?
Do working physicists consider Newtonian mechanics to be "falsified"?
How to rotate it perfectly?
How to market an anarchic city as a tourism spot to people living in civilized areas?
3 doors, three guards, one stone
What loss function to use when labels are probabilities?
Active filter with series inductor and resistor - do these exist?
How can you insert a "times/divide" symbol similar to the "plus/minus" (±) one?
How should I respond to a player wanting to catch a sword between their hands?
How many things? AとBがふたつ
Can a non-EU citizen traveling with me come with me through the EU passport line?
Passing functions in C++
How does modal jazz use chord progressions?
What LEGO pieces have "real-world" functionality?
Statistical model of ligand substitution
Simulating Exploding Dice
Is 1 ppb equal to 1 μg/kg?
How do I automatically answer y in bash script?
What was the last x86 CPU that did not have the x87 floating-point unit built in?
Unable to start mainnet node docker container
How to say that you spent the night with someone, you were only sleeping and nothing else?
How is simplicity better than precision and clarity in prose?
90's book, teen horror
Who can trigger ship-wide alerts in Star Trek?
Is it possible to ask for a hotel room without minibar/extra services?
Get product image cache path sql
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?Get original image file from a cache URLProduct Image Cache - Image ResizingSave image cache on CDN or turn image cache offHow do I add Product Images as URL instead of uploading them in Magento?Programmatically clean product image cache singularlyMagento cache showing old product images on page zoomProblem with product image cache after upgradeMagento2 Display extra product image in product pageMagento is duplicating imagesMagento2: How to disable product image cache url?What is the use of Magento 2.2.6 product image cache?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I need to get product image path with raw sql. Where does Magento store product image cache path? Table catalog_product_entity_media_gallery
stores images but without the cache path (/2/0/20.jpg
).
product-images cache sql
bumped to the homepage by Community♦ yesterday
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 need to get product image path with raw sql. Where does Magento store product image cache path? Table catalog_product_entity_media_gallery
stores images but without the cache path (/2/0/20.jpg
).
product-images cache sql
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
let me know the magento version please
– Nagaraju Kasa
Aug 23 '17 at 4:19
add a comment |
I need to get product image path with raw sql. Where does Magento store product image cache path? Table catalog_product_entity_media_gallery
stores images but without the cache path (/2/0/20.jpg
).
product-images cache sql
I need to get product image path with raw sql. Where does Magento store product image cache path? Table catalog_product_entity_media_gallery
stores images but without the cache path (/2/0/20.jpg
).
product-images cache sql
product-images cache sql
edited Sep 5 '18 at 8:36
kunj
2,6742523
2,6742523
asked Feb 2 '16 at 19:16
JohnyFreeJohnyFree
87411331
87411331
bumped to the homepage by Community♦ yesterday
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♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
let me know the magento version please
– Nagaraju Kasa
Aug 23 '17 at 4:19
add a comment |
let me know the magento version please
– Nagaraju Kasa
Aug 23 '17 at 4:19
let me know the magento version please
– Nagaraju Kasa
Aug 23 '17 at 4:19
let me know the magento version please
– Nagaraju Kasa
Aug 23 '17 at 4:19
add a comment |
2 Answers
2
active
oldest
votes
You can try this:
$product = Mage::getModel('catalog/product')->load($product_id);
$thumbnailpath = Mage::helper('catalog/image')->init($product, 'thumbnail');
$bigImagepath = Mage::helper('catalog/image')->init($product, 'image');
$smallImagepath = Mage::helper('catalog/image')->init($product, 'small_image');
Check also this post: https://magento.stackexchange.com/a/1008/7781
I can not use Magento models, I need raw sql.
– JohnyFree
Feb 3 '16 at 8:35
You have no way to do that. Because the path is constructed "dinamically" Read this, please: magento.stackexchange.com/a/1008
– osrecio
Feb 3 '16 at 8:52
add a comment |
The URL of images in cache is complex because it contains the MD5 of image params.(example:
/media/catalog/product/cache/1/image/9df78eab33525d08d6e5fb8d27136e95/m/e/me-d1_2.jpg)
But you can easily get the original image URL.
To get the base URL (unsecure):
SELECT value FROM core_config_data WHERE path='web/unsecure/base_url'
If you want the secure URL:
SELECT value FROM core_config_data WHERE path='web/secure/base_url'
it returns the website URL.
To construct the image URL, add "media/catalog/product" and the image path (example: "/a/c/ace-furniture.jpg").
Example:
http://example.com/media/catalog/product/a/c/ace-furniture.jpg
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%2f100111%2fget-product-image-cache-path-sql%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can try this:
$product = Mage::getModel('catalog/product')->load($product_id);
$thumbnailpath = Mage::helper('catalog/image')->init($product, 'thumbnail');
$bigImagepath = Mage::helper('catalog/image')->init($product, 'image');
$smallImagepath = Mage::helper('catalog/image')->init($product, 'small_image');
Check also this post: https://magento.stackexchange.com/a/1008/7781
I can not use Magento models, I need raw sql.
– JohnyFree
Feb 3 '16 at 8:35
You have no way to do that. Because the path is constructed "dinamically" Read this, please: magento.stackexchange.com/a/1008
– osrecio
Feb 3 '16 at 8:52
add a comment |
You can try this:
$product = Mage::getModel('catalog/product')->load($product_id);
$thumbnailpath = Mage::helper('catalog/image')->init($product, 'thumbnail');
$bigImagepath = Mage::helper('catalog/image')->init($product, 'image');
$smallImagepath = Mage::helper('catalog/image')->init($product, 'small_image');
Check also this post: https://magento.stackexchange.com/a/1008/7781
I can not use Magento models, I need raw sql.
– JohnyFree
Feb 3 '16 at 8:35
You have no way to do that. Because the path is constructed "dinamically" Read this, please: magento.stackexchange.com/a/1008
– osrecio
Feb 3 '16 at 8:52
add a comment |
You can try this:
$product = Mage::getModel('catalog/product')->load($product_id);
$thumbnailpath = Mage::helper('catalog/image')->init($product, 'thumbnail');
$bigImagepath = Mage::helper('catalog/image')->init($product, 'image');
$smallImagepath = Mage::helper('catalog/image')->init($product, 'small_image');
Check also this post: https://magento.stackexchange.com/a/1008/7781
You can try this:
$product = Mage::getModel('catalog/product')->load($product_id);
$thumbnailpath = Mage::helper('catalog/image')->init($product, 'thumbnail');
$bigImagepath = Mage::helper('catalog/image')->init($product, 'image');
$smallImagepath = Mage::helper('catalog/image')->init($product, 'small_image');
Check also this post: https://magento.stackexchange.com/a/1008/7781
edited Apr 13 '17 at 12:54
Community♦
1
1
answered Feb 2 '16 at 20:56
osrecioosrecio
1,410516
1,410516
I can not use Magento models, I need raw sql.
– JohnyFree
Feb 3 '16 at 8:35
You have no way to do that. Because the path is constructed "dinamically" Read this, please: magento.stackexchange.com/a/1008
– osrecio
Feb 3 '16 at 8:52
add a comment |
I can not use Magento models, I need raw sql.
– JohnyFree
Feb 3 '16 at 8:35
You have no way to do that. Because the path is constructed "dinamically" Read this, please: magento.stackexchange.com/a/1008
– osrecio
Feb 3 '16 at 8:52
I can not use Magento models, I need raw sql.
– JohnyFree
Feb 3 '16 at 8:35
I can not use Magento models, I need raw sql.
– JohnyFree
Feb 3 '16 at 8:35
You have no way to do that. Because the path is constructed "dinamically" Read this, please: magento.stackexchange.com/a/1008
– osrecio
Feb 3 '16 at 8:52
You have no way to do that. Because the path is constructed "dinamically" Read this, please: magento.stackexchange.com/a/1008
– osrecio
Feb 3 '16 at 8:52
add a comment |
The URL of images in cache is complex because it contains the MD5 of image params.(example:
/media/catalog/product/cache/1/image/9df78eab33525d08d6e5fb8d27136e95/m/e/me-d1_2.jpg)
But you can easily get the original image URL.
To get the base URL (unsecure):
SELECT value FROM core_config_data WHERE path='web/unsecure/base_url'
If you want the secure URL:
SELECT value FROM core_config_data WHERE path='web/secure/base_url'
it returns the website URL.
To construct the image URL, add "media/catalog/product" and the image path (example: "/a/c/ace-furniture.jpg").
Example:
http://example.com/media/catalog/product/a/c/ace-furniture.jpg
add a comment |
The URL of images in cache is complex because it contains the MD5 of image params.(example:
/media/catalog/product/cache/1/image/9df78eab33525d08d6e5fb8d27136e95/m/e/me-d1_2.jpg)
But you can easily get the original image URL.
To get the base URL (unsecure):
SELECT value FROM core_config_data WHERE path='web/unsecure/base_url'
If you want the secure URL:
SELECT value FROM core_config_data WHERE path='web/secure/base_url'
it returns the website URL.
To construct the image URL, add "media/catalog/product" and the image path (example: "/a/c/ace-furniture.jpg").
Example:
http://example.com/media/catalog/product/a/c/ace-furniture.jpg
add a comment |
The URL of images in cache is complex because it contains the MD5 of image params.(example:
/media/catalog/product/cache/1/image/9df78eab33525d08d6e5fb8d27136e95/m/e/me-d1_2.jpg)
But you can easily get the original image URL.
To get the base URL (unsecure):
SELECT value FROM core_config_data WHERE path='web/unsecure/base_url'
If you want the secure URL:
SELECT value FROM core_config_data WHERE path='web/secure/base_url'
it returns the website URL.
To construct the image URL, add "media/catalog/product" and the image path (example: "/a/c/ace-furniture.jpg").
Example:
http://example.com/media/catalog/product/a/c/ace-furniture.jpg
The URL of images in cache is complex because it contains the MD5 of image params.(example:
/media/catalog/product/cache/1/image/9df78eab33525d08d6e5fb8d27136e95/m/e/me-d1_2.jpg)
But you can easily get the original image URL.
To get the base URL (unsecure):
SELECT value FROM core_config_data WHERE path='web/unsecure/base_url'
If you want the secure URL:
SELECT value FROM core_config_data WHERE path='web/secure/base_url'
it returns the website URL.
To construct the image URL, add "media/catalog/product" and the image path (example: "/a/c/ace-furniture.jpg").
Example:
http://example.com/media/catalog/product/a/c/ace-furniture.jpg
answered May 9 '17 at 15:57
Maxime CoudreuseMaxime Coudreuse
13
13
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%2f100111%2fget-product-image-cache-path-sql%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
let me know the magento version please
– Nagaraju Kasa
Aug 23 '17 at 4:19