Custom Category Image Attribute Preview The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)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 can't devices on different VLANs, but on the same subnet, communicate?

Difference between "generating set" and free product?

how can a perfect fourth interval be considered either consonant or dissonant?

Would an alien lifeform be able to achieve space travel if lacking in vision?

How to copy the contents of all files with a certain name into a new file?

How many people can fit inside Mordenkainen's Magnificent Mansion?

Who or what is the being for whom Being is a question for Heidegger?

How to politely respond to generic emails requesting a PhD/job in my lab? Without wasting too much time

How did the audience guess the pentatonic scale in Bobby McFerrin's presentation?

How to tell if two pearson correlations from the same sample differ significanly

How to delete random line from file using Unix command?

Do working physicists consider Newtonian mechanics to be "falsified"?

Did the UK government pay "millions and millions of dollars" to try to snag Julian Assange?

Why does the Event Horizon Telescope (EHT) not include telescopes from Africa, Asia or Australia?

What do you call a plan that's an alternative plan in case your initial plan fails?

The variadic template constructor of my class cannot modify my class members, why is that so?

What was the last x86 CPU that did not have the x87 floating-point unit built in?

How can I define good in a religion that claims no moral authority?

How does this infinite series simplify to an integral?

What aspect of planet Earth must be changed to prevent the industrial revolution?

Windows 10: How to Lock (not sleep) laptop on lid close?

How to pronounce 1ターン?

Are my PIs rude or am I just being too sensitive?

Empty set is subset of every set? If yes, why that...



Custom Category Image Attribute Preview



The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)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
















bumped to the homepage by Community 7 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • 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
















bumped to the homepage by Community 7 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • 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,68523366




4,68523366










asked Dec 19 '14 at 5:47









blakcapsblakcaps

93942654




93942654





bumped to the homepage by Community 7 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 7 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.














  • 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,68523366




4,68523366










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