Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-71040

Allow file extension .jpeg (in addition to .jpg) for upload of course overview images by default to avoid confusion

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Minor Minor
    • None
    • 3.8.7, 3.9.4
    • Administration, Course
    • None
    • MOODLE_38_STABLE, MOODLE_39_STABLE

      When trying to upload an image file to be used for the course overview, it is currently possible to upload files with the extensions .jpg, .gif and .png only.

      I know that any moodle adminstrator can change this to allow other file extensions in his or her installation, but still, the moodle default should be a s sensible as possible.

      Below the upload form in course/edit.php, the end user wanting to upload a course image can read the following text:

      Akzeptierte Dateitypen:

      • Bilddatei (GIF) .gif
      • Bilddatei (JPEG) .jpg
      • Bilddatei (PNG) .png

      .
      I am only using German versions of moodle, so I don't know the literal english wording. A sensible tranlation is "accepted file types: * image file (JPEG) .jpg" and so forth.

      Now, when uploading a file with the extension ".jpeg" (not the abbreviated ".jpg"!) an error message is displayed:

      Fehler

      Dateityp Bilddatei (JPEG) wird nicht akzeptiert

      English translation (not literal moodle sting): "Error File type image file (JPEG) not accepted."

      This message is very confusing for the average user. And even for an advanced user, who knows (or can find out) what this error message acutally means ("remove the third last letter from your filename and try again" ), this is still unnecessarily annoying.

       

      Simple Solution:

      Please change line 259 in the default configuration in the following file:

      https://git.moodle.org/gw?p=moodle.git;a=blob;f=admin/settings/appearance.php;h=4aa50b4bcf38aa66a976e40469d6b36a0a00f8ba;hb=HEAD

      to read 

       new lang_string('configcourseoverviewfilesext', 'admin'), '.jpg,.jpe,.jpeg,.gif,.png'));

      instead of (currently) 

       new lang_string('configcourseoverviewfilesext', 'admin'), '.jpg,.gif,.png'));

       

      Thank you very much for considering this request. There are thousands of moodle users out there whom you will save a few frustrating/lost minutes with moodle (or at least a frown )!

      P.S.: In general, I think that the list of supported file types should be longer and include some of the more recent popular web graphics formats (.webp, .avif, ...) as well as at least one vector format (.svg / .svgz would be great and is well supported by modern browsers in 2021).
      I also think that the content of a file should be examined to determine if it is suitable as a course image (or for any purpose in moodle for that matter) - instead of the arbitrarily changeable file extension. Think of the unix file command.
      However, this is just a general remark not part of this particular issue report .

       

            Unassigned Unassigned
            dfronczek David N. Fronczek
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.