Image field not working

In studio i add image field to account and contact. Field did show up and i can upload image.
But image i not showing in detail view.
Console give me Failed to load resource: the server responded with a status of 500 (Internal Server Error) for image url.

Html output is

<span class="sugar_field" id="photo">
<img src="index.php?entryPoint=download&amp;id=d796cee5-74bc-0510-fcd3-579a1a8aebc0_photo&amp;type=Contacts" style="max-width: 160px;" height="160">

Missing image

File in cpanel

I upgrade to 7.7 (from 7.6) and no change. Image on accounts and photo on contacts not showing.

There’s a known bug, still unfixed, that is similar to this:

However, that would be only for subpanels, not for detail views like in your case. And your URL seems to correctly include the “type=Contacts” part.

  1. Have you checked file permissions for the folder and image file? Maybe it’s simply not getting access to the file.

  2. What browser are you using? Can you try with another? There was also a bug that images weren’t showing in Edge browser and IE. (but that one is supposedly fixed now)

1 Like

Thank you for reply

  1. Any file permisions not working. I have tryed 777 for folder and image.
  2. IE 9, Latest FF and Chrome. Non of them not showing image.

If I cant fix that, I must look for other CRM solution.

Now that I think of it, error 500 is not a missing file (like it would get if it was a permissions problem), it’s an internal error, so you should be able to check your logs and see what going wrong.


on the root of your SuiteCRM install

that you have to turn on in your php.ini to make it work. Google has plenty of pages explaining how to do it.

There could also be useful Apache logs, maybe.

Only error in error_log is

Call to undefined function mime_content_type() in /home/domain/public_html/crm/download.php on line 174

and in sugarcrm.log

Thu Jul 28 15:35:32 2016 [804595][-none-][FATAL] Query Failed: SELECT id FROM aow_workflow WHERE aow_workflow.flow_module = ‘ACLActions’ AND aow_workflow.status = ‘Active’ AND (aow_workflow.run_when = ‘Always’ OR aow_workflow.run_when = ‘On_Save’ OR aow_workflow.run_when = ‘Create’) AND aow_workflow.deleted = 0 : MySQL error 1146: Table ‘domain_crm.aow_workflow’ doesn’t exist

  1. Do those errors match the moments when you refresh the page? (I just want to make sure because it’s easy to go chasing wrong clues from the logs, but it won’t help much…)

  2. And do you have php_errors.log? The one you set up in php.ini.

  3. I investigated your error and it seems that a call to mime_content_type() was recently added to that location (to fix that Edge bug I mentioned!) but that function is deprecated in some versions of PHP (like 5.5) but now is un-deprecated in PHP 7.0! Which version of PHP do you have?

When i remove fix in download.php I can see image.
// Fix for issue 1506 and issue 1304 : IE11 and Microsoft Edge cannot display generic ‘application/octet-stream’ (which is defined as “arbitrary binary data” in RFC 2046).

So it seems that fix broke image display and should be corected.

Im on php 5.6

Thank you for pointing me in right direction.

I think your version is supposed to be supported:

But with all this deprecating and un-deprecating it’s understandable that the fix was tested correctly but now turns out to be problematic for some setups.

Maybe you could open an issue in SuiteCRM’s Github explaining all this?

I dont have acc on github so if you do, please forward.

New issue is here:

Hi Maks,

What OS are you working from? If it is Windows this is more likely down to the PHP package you installed. We had a very similar issue which was resolved by checking your PHP installation if it has fileinfo included - which fo some reason some Windows packages did not.

Have a look at that issue and let us know how you get on.

Install is on apache server with php 5.6. I have tryed 5.4 and same problem.
I will look for complete config tomorow.

Hi Maks

the important question right now is probably quite easy to answer… Windows or Linux?


I have the same problem in custom modules on Linux (Mysql, PHP 5.6).
SuIte 7.5.1
FireFox report its Broken Images, in Upload folder have file with same name as in link.

  • dont loaded.
    Steps with Q repair & rebuild and other well done, but dont took a result.
    Plz help, i have only one week to finish this module.
    Thank you.

@Yug, do you have the same errors in the logs (and browser console) as the original poster? I just want to make sure we’re seeing the exact same issue. Thanks.

You right, its not a same errors.
But after Upgrade to 7.7.4 bug is gone - Image field work correct.
Thanks and good luck.