User uploaded .jpg not displaying in preview

User uploaded .jpg not displaying in preview

by Selene Posada -
Number of replies: 2

Hello,

Currently I'm experiencing an issue where, if a user uploads a profile picture for example, if its a jpeg it will not display the preview. I have attempted uploading an image as a student and as an admin user and was met with the same results. Editing and saving the file out as PNG or GIF result in it displaying just fine as a work around.Picture depicting the described issue of jpegs not displaying

Here is my spec overview:

On CentOS 7.5

Using Moodle 3.5.1+ with Apache Apache/2.4.6 (CentOS) and PHP-FPM with php 7.2.8.

gd has jpg enabled with ignore-jpg-warning set to 1 in php.ini 

If any additional info is needed let me know. 


Thanks in advance for any help,


Tanner Posada


Average of ratings: -
In reply to Selene Posada

Re: User uploaded .jpg not displaying in preview

by S. kavita -
Picture of Testers

Hi,

Upload the image by renaming it to the username. So if username is test then rename it to test.jpg


Happy Moodling!!!!

In reply to S. kavita

Re: User uploaded .jpg not displaying in preview

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Really!! You have to be kidding!  Why would code ever 'ever' work like that?  Works for me on a local install without changing the filename.