1

I am not able to upload images in the admin-end by clicking "Insert Image" link in CMS block or CMS page.

On Clicking Insert Image link the Media gallery popup appears. Then on clicking the browse button it allows me to select image from my machine, but after selecting the image, it throws the error in console and doesn't show me the image in Media gallery popup to upload the image in Magento.

I am getting below error message in the firebug console.

<admin-end url>/cms_wysiwyg_images/thumbnail/file/QWJvdXRfUGV0RG9vcnMuY29tX2ltYWdlX29mX2JvcmRlcl9jb2xsaWVfYW5kX2dvbGRlbl9yZXRyaWV2ZXJfZ29pbmdfdGhyb3VnaF9kb2dneV9kb29yXzEucG5n/

When I am trying to open this link directly in the browser, it is generating error report.
The error in error report is below :

"Unsupported image format.";i:1;s:1512:"#0 lib/Varien/Image/Adapter/Gd2.php(60): Varien_Image_Adapter_Gd2->_getCallback('create')

Same thing is working absolutely fine in my staging environment but creating issue on live.
Staging and live site are on same server.
I have tried uploading different image types as well like gif, png, jpg, but everytime the issue is same.

What can be the probable cause of this issue and how can I fix it?

17
  • could be php version issue on live server or any lib
    – liyakat
    Sep 7, 2015 at 4:30
  • @liyakat : My staging and live site are on same server. Sep 7, 2015 at 4:42
  • Look here stackoverflow.com/questions/15966668/… someone had the same problem.
    – kuba_ceg
    Sep 7, 2015 at 4:57
  • @kuba_ceg : Thanks, I have already tried this solution, but it is not working for me. Sep 7, 2015 at 5:37
  • @AnshuMishra, have you checked php version and gd lib version ?
    – liyakat
    Sep 7, 2015 at 5:52

2 Answers 2

0

Refresh your magento cache and flush everything

2
  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review Jan 17, 2017 at 13:30
  • Well it worked for me and the symptoms were exactly the same. It does provide an answer, the correct one. If you look at the other answer a emphasis on CDN is made but the question does not mention CDN once.
    – tread
    Jan 17, 2017 at 13:52
-1

The issue was related to CDN.
My full store is on secure and working with CDN.

Some elements of the image uploader and the wysiwyg content editor are served from within your ‘skin’ directory – which is now served from your CDN, and will start throwing cross domain errors.

The Secure and Unsecure URL settings configured in the default config (top left) in the admin section. Are global – they affect all the stores and the admin area. In order to disable the CDN on the admin, but keep it for the website, change the scope of your configuration to Main Website (top left), uncheck the ‘Use Default’ settings, and then add in the CDN urls.

So under Current Configuration Scope: Default config you should use ;

http://www.yourdomain.com/

Under Current Configuration Scope: Main Website and default store view you should use

http://cname.yourdomain.com/ I’ve created Cname records to map to the cdn url’s (it’s neater) but you can just use the cdn urls if you prefer.
Some reference links :

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.