Custom Category Image Attribute Preview 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?Generating preview images of style x fabric x colorHow can i make the preview image bigger?Product custom image option with previewHow to preview custom page in magento for mouseover?Create custom image attribute for category size chartHow to preview uploaded image in custom module formcreate custom attribute for root category in adminCustom category attributeImage Preview in admin form magento 2Add image type attribute for category

Why aren't air breathing engines used as small first stages

Maximum summed powersets with non-adjacent items

What are the out-of-universe reasons for the references to Toby Maguire-era Spider-Man in ITSV

How do pianists reach extremely loud dynamics?

Do jazz musicians improvise on the parent scale in addition to the chord-scales?

Why are the trig functions versine, haversine, exsecant, etc, rarely used in modern mathematics?

How come Sam didn't become Lord of Horn Hill?

How do I make this wiring inside cabinet safer? (Pic)

How can I use the Python library networkx from Mathematica?

What do you call the main part of a joke?

Denied boarding although I have proper visa and documentation. To whom should I make a complaint?

Can an alien society believe that their star system is the universe?

Would "destroying" Wurmcoil Engine prevent its tokens from being created?

How would a mousetrap for use in space work?

What causes the direction of lightning flashes?

Why do we bend a book to keep it straight?

Is the Standard Deduction better than Itemized when both are the same amount?

Significance of Cersei's obsession with elephants?

Can melee weapons be used to deliver Contact Poisons?

On SQL Server, is it possible to restrict certain users from using certain functions, operators or statements?

8 Prisoners wearing hats

Crossing US/Canada Border for less than 24 hours

Do I really need recursive chmod to restrict access to a folder?

What is the escape velocity of a neutron particle (not neutron star)



Custom Category Image Attribute Preview



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?Generating preview images of style x fabric x colorHow can i make the preview image bigger?Product custom image option with previewHow to preview custom page in magento for mouseover?Create custom image attribute for category size chartHow to preview uploaded image in custom module formcreate custom attribute for root category in adminCustom category attributeImage Preview in admin form magento 2Add image type attribute for category



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








2















I've created a custom image attribute for the category. The image will be saved in media/catalog/category/example location.



When I upload the image, preview showing as a broken image even though image exists in that location.



$installer->addAttribute($entity, 'g_main_image', array(
'input'=>'image',
'type'=>'varchar',
'label'=>'Gallery Main Image',
'required'=>false,
'visible'=>true,
'user_defined'=>true,
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
));


Image preview showing http://localhost/dev/media/catalog/category/audi.jpg but the actual image is in



http://localhost/dev/media/catalog/category/gallery/audi.jpg









share|improve this question
























  • check the image url in backend that tried to preview.and update with your question.

    – Manikandan Arunachalam
    Dec 19 '14 at 6:09












  • Added the url for reference.

    – blakcaps
    Dec 19 '14 at 6:28











  • why dont you use magento category image attribute?

    – Manikandan Arunachalam
    Dec 19 '14 at 6:38












  • I am using category image for other purposes.

    – blakcaps
    Dec 19 '14 at 6:56











  • just post the code you used for category image saving.

    – Manikandan Arunachalam
    Dec 19 '14 at 7:05

















2















I've created a custom image attribute for the category. The image will be saved in media/catalog/category/example location.



When I upload the image, preview showing as a broken image even though image exists in that location.



$installer->addAttribute($entity, 'g_main_image', array(
'input'=>'image',
'type'=>'varchar',
'label'=>'Gallery Main Image',
'required'=>false,
'visible'=>true,
'user_defined'=>true,
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
));


Image preview showing http://localhost/dev/media/catalog/category/audi.jpg but the actual image is in



http://localhost/dev/media/catalog/category/gallery/audi.jpg









share|improve this question
























  • check the image url in backend that tried to preview.and update with your question.

    – Manikandan Arunachalam
    Dec 19 '14 at 6:09












  • Added the url for reference.

    – blakcaps
    Dec 19 '14 at 6:28











  • why dont you use magento category image attribute?

    – Manikandan Arunachalam
    Dec 19 '14 at 6:38












  • I am using category image for other purposes.

    – blakcaps
    Dec 19 '14 at 6:56











  • just post the code you used for category image saving.

    – Manikandan Arunachalam
    Dec 19 '14 at 7:05













2












2








2








I've created a custom image attribute for the category. The image will be saved in media/catalog/category/example location.



When I upload the image, preview showing as a broken image even though image exists in that location.



$installer->addAttribute($entity, 'g_main_image', array(
'input'=>'image',
'type'=>'varchar',
'label'=>'Gallery Main Image',
'required'=>false,
'visible'=>true,
'user_defined'=>true,
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
));


Image preview showing http://localhost/dev/media/catalog/category/audi.jpg but the actual image is in



http://localhost/dev/media/catalog/category/gallery/audi.jpg









share|improve this question
















I've created a custom image attribute for the category. The image will be saved in media/catalog/category/example location.



When I upload the image, preview showing as a broken image even though image exists in that location.



$installer->addAttribute($entity, 'g_main_image', array(
'input'=>'image',
'type'=>'varchar',
'label'=>'Gallery Main Image',
'required'=>false,
'visible'=>true,
'user_defined'=>true,
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
));


Image preview showing http://localhost/dev/media/catalog/category/audi.jpg but the actual image is in



http://localhost/dev/media/catalog/category/gallery/audi.jpg






magento-1.9 category-attribute image-preview






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 15 '17 at 1:05









Rafael Corrêa Gomes

4,71523366




4,71523366










asked Dec 19 '14 at 5:47









blakcapsblakcaps

93942654




93942654












  • check the image url in backend that tried to preview.and update with your question.

    – Manikandan Arunachalam
    Dec 19 '14 at 6:09












  • Added the url for reference.

    – blakcaps
    Dec 19 '14 at 6:28











  • why dont you use magento category image attribute?

    – Manikandan Arunachalam
    Dec 19 '14 at 6:38












  • I am using category image for other purposes.

    – blakcaps
    Dec 19 '14 at 6:56











  • just post the code you used for category image saving.

    – Manikandan Arunachalam
    Dec 19 '14 at 7:05

















  • check the image url in backend that tried to preview.and update with your question.

    – Manikandan Arunachalam
    Dec 19 '14 at 6:09












  • Added the url for reference.

    – blakcaps
    Dec 19 '14 at 6:28











  • why dont you use magento category image attribute?

    – Manikandan Arunachalam
    Dec 19 '14 at 6:38












  • I am using category image for other purposes.

    – blakcaps
    Dec 19 '14 at 6:56











  • just post the code you used for category image saving.

    – Manikandan Arunachalam
    Dec 19 '14 at 7:05
















check the image url in backend that tried to preview.and update with your question.

– Manikandan Arunachalam
Dec 19 '14 at 6:09






check the image url in backend that tried to preview.and update with your question.

– Manikandan Arunachalam
Dec 19 '14 at 6:09














Added the url for reference.

– blakcaps
Dec 19 '14 at 6:28





Added the url for reference.

– blakcaps
Dec 19 '14 at 6:28













why dont you use magento category image attribute?

– Manikandan Arunachalam
Dec 19 '14 at 6:38






why dont you use magento category image attribute?

– Manikandan Arunachalam
Dec 19 '14 at 6:38














I am using category image for other purposes.

– blakcaps
Dec 19 '14 at 6:56





I am using category image for other purposes.

– blakcaps
Dec 19 '14 at 6:56













just post the code you used for category image saving.

– Manikandan Arunachalam
Dec 19 '14 at 7:05





just post the code you used for category image saving.

– Manikandan Arunachalam
Dec 19 '14 at 7:05










1 Answer
1






active

oldest

votes


















0














Change permission to your media/category to 755.



or



You are saving the image to a directory and not correctly reference it in the table, so check your custom attribute value.






share|improve this answer

























  • How changing file permission would help?Image is displaying correctly on the frontend. Only image preview in the backend is not working.I suppose this is something to do with the code.

    – blakcaps
    Dec 19 '14 at 6:06











  • oh ok sorry i misunderstood, i'll come up with solution.

    – Manikandan Arunachalam
    Dec 19 '14 at 6:08











  • check the url in backend it tries to fetch.and post it.

    – Manikandan Arunachalam
    Dec 19 '14 at 6:08











  • save image value in db like gallery/imagename.jpg and check.plz add gallery before imagename in db table before save.

    – Rakesh Jesadiya
    Nov 17 '15 at 6:09











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%2f48828%2fcustom-category-image-attribute-preview%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














Change permission to your media/category to 755.



or



You are saving the image to a directory and not correctly reference it in the table, so check your custom attribute value.






share|improve this answer

























  • How changing file permission would help?Image is displaying correctly on the frontend. Only image preview in the backend is not working.I suppose this is something to do with the code.

    – blakcaps
    Dec 19 '14 at 6:06











  • oh ok sorry i misunderstood, i'll come up with solution.

    – Manikandan Arunachalam
    Dec 19 '14 at 6:08











  • check the url in backend it tries to fetch.and post it.

    – Manikandan Arunachalam
    Dec 19 '14 at 6:08











  • save image value in db like gallery/imagename.jpg and check.plz add gallery before imagename in db table before save.

    – Rakesh Jesadiya
    Nov 17 '15 at 6:09















0














Change permission to your media/category to 755.



or



You are saving the image to a directory and not correctly reference it in the table, so check your custom attribute value.






share|improve this answer

























  • How changing file permission would help?Image is displaying correctly on the frontend. Only image preview in the backend is not working.I suppose this is something to do with the code.

    – blakcaps
    Dec 19 '14 at 6:06











  • oh ok sorry i misunderstood, i'll come up with solution.

    – Manikandan Arunachalam
    Dec 19 '14 at 6:08











  • check the url in backend it tries to fetch.and post it.

    – Manikandan Arunachalam
    Dec 19 '14 at 6:08











  • save image value in db like gallery/imagename.jpg and check.plz add gallery before imagename in db table before save.

    – Rakesh Jesadiya
    Nov 17 '15 at 6:09













0












0








0







Change permission to your media/category to 755.



or



You are saving the image to a directory and not correctly reference it in the table, so check your custom attribute value.






share|improve this answer















Change permission to your media/category to 755.



or



You are saving the image to a directory and not correctly reference it in the table, so check your custom attribute value.







share|improve this answer














share|improve this answer



share|improve this answer








edited Sep 15 '17 at 1:06









Rafael Corrêa Gomes

4,71523366




4,71523366










answered Dec 19 '14 at 6:03









Manikandan ArunachalamManikandan Arunachalam

647723




647723












  • How changing file permission would help?Image is displaying correctly on the frontend. Only image preview in the backend is not working.I suppose this is something to do with the code.

    – blakcaps
    Dec 19 '14 at 6:06











  • oh ok sorry i misunderstood, i'll come up with solution.

    – Manikandan Arunachalam
    Dec 19 '14 at 6:08











  • check the url in backend it tries to fetch.and post it.

    – Manikandan Arunachalam
    Dec 19 '14 at 6:08











  • save image value in db like gallery/imagename.jpg and check.plz add gallery before imagename in db table before save.

    – Rakesh Jesadiya
    Nov 17 '15 at 6:09

















  • How changing file permission would help?Image is displaying correctly on the frontend. Only image preview in the backend is not working.I suppose this is something to do with the code.

    – blakcaps
    Dec 19 '14 at 6:06











  • oh ok sorry i misunderstood, i'll come up with solution.

    – Manikandan Arunachalam
    Dec 19 '14 at 6:08











  • check the url in backend it tries to fetch.and post it.

    – Manikandan Arunachalam
    Dec 19 '14 at 6:08











  • save image value in db like gallery/imagename.jpg and check.plz add gallery before imagename in db table before save.

    – Rakesh Jesadiya
    Nov 17 '15 at 6:09
















How changing file permission would help?Image is displaying correctly on the frontend. Only image preview in the backend is not working.I suppose this is something to do with the code.

– blakcaps
Dec 19 '14 at 6:06





How changing file permission would help?Image is displaying correctly on the frontend. Only image preview in the backend is not working.I suppose this is something to do with the code.

– blakcaps
Dec 19 '14 at 6:06













oh ok sorry i misunderstood, i'll come up with solution.

– Manikandan Arunachalam
Dec 19 '14 at 6:08





oh ok sorry i misunderstood, i'll come up with solution.

– Manikandan Arunachalam
Dec 19 '14 at 6:08













check the url in backend it tries to fetch.and post it.

– Manikandan Arunachalam
Dec 19 '14 at 6:08





check the url in backend it tries to fetch.and post it.

– Manikandan Arunachalam
Dec 19 '14 at 6:08













save image value in db like gallery/imagename.jpg and check.plz add gallery before imagename in db table before save.

– Rakesh Jesadiya
Nov 17 '15 at 6:09





save image value in db like gallery/imagename.jpg and check.plz add gallery before imagename in db table before save.

– Rakesh Jesadiya
Nov 17 '15 at 6:09

















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%2f48828%2fcustom-category-image-attribute-preview%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

Bulk add to cart function issuecart vs. mini cart issue … rwd themeRedirect Add to cart button to cart pageAdd to cart issue - Magento 2.1The requested Payment Method is not available When creating an orderM2: reason add-to-cart might not function in production modeAdd to cart issue in some android devicesMagento 2 - custom price can not add to subtotal and grand total after add to cartAdd to cart codeIssue with my cart module on pdp and cart pages, just keeps spinningBulk price and quantity update using rest api

Magento2 - How to hide price filter only in specific categories?Multiselect price filter attribute in layered navigationhide only some categories from layered navigation in magentoRemove Price Filter on certain categoriescustomize layered price filter?Hide Price for a particular customer groupPrice filter in layered navigation not working correctly with price including tax in magento 2.2.3Magento 2 how to hide attribute at Layered navigation?Magento 2. how to hide price only for specific categoriesMagento 2 How can I hide the price and total from cart and checkout summary?Magento2: Can we add navigation layered filter like price filter for other attribute?