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;








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).










share|improve this question
















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

















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).










share|improve this question
















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













0












0








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).










share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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

















  • 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










2 Answers
2






active

oldest

votes


















0














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






share|improve this answer

























  • 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


















0














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





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%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









    0














    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






    share|improve this answer

























    • 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















    0














    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






    share|improve this answer

























    • 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













    0












    0








    0







    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






    share|improve this answer















    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







    share|improve this answer














    share|improve this answer



    share|improve this answer








    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

















    • 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













    0














    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





    share|improve this answer



























      0














      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





      share|improve this answer

























        0












        0








        0







        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





        share|improve this answer













        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






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered May 9 '17 at 15:57









        Maxime CoudreuseMaxime Coudreuse

        13




        13



























            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%2f100111%2fget-product-image-cache-path-sql%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

            Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

            Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

            Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form