.jpg extension not recognized

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35650
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: .jpg extension not recognized

Unread post by Moonchild » 2024-02-08, 09:22

"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
LuftWafflePilot
Fanatic
Fanatic
Posts: 225
Joined: 2021-02-19, 20:46

Re: .jpg extension not recognized

Unread post by LuftWafflePilot » 2024-02-08, 11:01

Moonchild wrote:
2024-02-07, 17:40
Can you please post the output of help -> troubleshooting information? (use the "Copy text to clipboard" button and paste it in your reply, preferably using the forum's [ hide ] tags)
Application Basics
------------------

Name: Pale Moon
Version: 32.5.2 (64-bit)
Build ID: 20231221131038
Update Channel: release
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Goanna/6.5 Firefox/102.0 PaleMoon/32.5.2
OS: Windows_NT 10.0
Safe Mode: false

Extensions
----------

Name: Auto-Sort Bookmarks
Version: 2.10.12
Enabled: true
ID: sortbookmarks@bouanto

Name: Copy As Plain Text
Version: 1.2.3
Enabled: true
ID: {400a725d-b074-4b70-bd7a-b91dd71f24e5}

Name: Decentraleyes
Version: 1.4.3
Enabled: true
ID: jid1-BoFifL9Vbdl2zQ@jetpack

Name: Swabby
Version: 1.1.2
Enabled: true
ID: swabby@wolfbeast.com

Name: uBlock Origin
Version: 1.16.4.30
Enabled: true
ID: uBlock0@raymondhill.net

Graphics
--------

Features
Compositing: Direct3D 11
GPU Accelerated Windows: 1/1 Direct3D 11 (OMTC)
Asynchronous Pan/Zoom: none
WebGL 1 Driver WSI Info: EGL_VENDOR: Google Inc. (adapter LUID: 000000000000c902) EGL_VERSION: 1.4 (ANGLE 2.1.0.) EGL_EXTENSIONS: EGL_EXT_create_context_robustness EGL_ANGLE_d3d_share_handle_client_buffer EGL_ANGLE_surface_d3d_texture_2d_share_handle EGL_ANGLE_query_surface_pointer EGL_ANGLE_window_fixed_size EGL_ANGLE_keyed_mutex EGL_ANGLE_surface_orientation EGL_ANGLE_direct_composition EGL_NV_post_sub_buffer EGL_KHR_create_context EGL_EXT_device_query EGL_KHR_image EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_get_all_proc_addresses EGL_KHR_stream EGL_KHR_stream_consumer_gltexture EGL_NV_stream_consumer_gltexture_yuv EGL_ANGLE_flexible_surface_compatibility EGL_ANGLE_stream_producer_d3d_texture_nv12 EGL_EXTENSIONS(nullptr): EGL_EXT_client_extensions EGL_EXT_platform_base EGL_EXT_platform_device EGL_ANGLE_platform_angle EGL_ANGLE_platform_angle_d3d EGL_ANGLE_device_creation EGL_ANGLE_device_creation_d3d11 EGL_ANGLE_experimental_present_path EGL_KHR_client_get_all_proc_addresses
WebGL 1 Driver Renderer: Google Inc. -- ANGLE (Radeon RX 580 Series Direct3D11 vs_5_0 ps_5_0)
WebGL 1 Driver Version: OpenGL ES 2.0 (ANGLE 2.1.0.)
WebGL 1 Driver Extensions: GL_OES_element_index_uint GL_OES_packed_depth_stencil GL_OES_get_program_binary GL_OES_rgb8_rgba8 GL_EXT_texture_format_BGRA8888 GL_EXT_read_format_bgra GL_NV_pixel_buffer_object GL_OES_mapbuffer GL_EXT_map_buffer_range GL_EXT_color_buffer_half_float GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_float GL_OES_texture_float_linear GL_EXT_texture_rg GL_EXT_texture_compression_dxt1 GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_OES_compressed_ETC1_RGB8_texture GL_EXT_sRGB GL_ANGLE_depth_texture GL_OES_depth32 GL_EXT_texture_storage GL_OES_texture_npot GL_EXT_draw_buffers GL_EXT_texture_filter_anisotropic GL_EXT_occlusion_query_boolean GL_NV_fence GL_EXT_disjoint_timer_query GL_EXT_robustness GL_EXT_blend_minmax GL_ANGLE_framebuffer_blit GL_ANGLE_framebuffer_multisample GL_ANGLE_instanced_arrays GL_ANGLE_pack_reverse_row_order GL_OES_standard_derivatives GL_EXT_shader_texture_lod GL_EXT_frag_depth GL_ANGLE_texture_usage GL_ANGLE_translated_shader_source GL_EXT_discard_framebuffer GL_EXT_debug_marker GL_OES_EGL_image GL_OES_EGL_image_external GL_NV_EGL_stream_consumer_external GL_EXT_unpack_subimage GL_NV_pack_subimage GL_OES_vertex_array_object GL_KHR_debug GL_ANGLE_lossy_etc_decode GL_CHROMIUM_bind_uniform_location GL_CHROMIUM_sync_query GL_CHROMIUM_copy_texture
WebGL 1 Extensions: ANGLE_instanced_arrays EXT_blend_minmax EXT_color_buffer_half_float EXT_frag_depth EXT_shader_texture_lod EXT_texture_filter_anisotropic EXT_disjoint_timer_query MOZ_debug_get OES_element_index_uint OES_standard_derivatives OES_texture_float OES_texture_float_linear OES_texture_half_float OES_texture_half_float_linear OES_vertex_array_object WEBGL_color_buffer_float WEBGL_compressed_texture_etc1 WEBGL_compressed_texture_s3tc WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_depth_texture WEBGL_draw_buffers WEBGL_lose_context MOZ_WEBGL_lose_context MOZ_WEBGL_compressed_texture_s3tc MOZ_WEBGL_depth_texture
WebGL 2 Driver WSI Info: EGL_VENDOR: Google Inc. (adapter LUID: 000000000000c902) EGL_VERSION: 1.4 (ANGLE 2.1.0.) EGL_EXTENSIONS: EGL_EXT_create_context_robustness EGL_ANGLE_d3d_share_handle_client_buffer EGL_ANGLE_surface_d3d_texture_2d_share_handle EGL_ANGLE_query_surface_pointer EGL_ANGLE_window_fixed_size EGL_ANGLE_keyed_mutex EGL_ANGLE_surface_orientation EGL_ANGLE_direct_composition EGL_NV_post_sub_buffer EGL_KHR_create_context EGL_EXT_device_query EGL_KHR_image EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_get_all_proc_addresses EGL_KHR_stream EGL_KHR_stream_consumer_gltexture EGL_NV_stream_consumer_gltexture_yuv EGL_ANGLE_flexible_surface_compatibility EGL_ANGLE_stream_producer_d3d_texture_nv12 EGL_EXTENSIONS(nullptr): EGL_EXT_client_extensions EGL_EXT_platform_base EGL_EXT_platform_device EGL_ANGLE_platform_angle EGL_ANGLE_platform_angle_d3d EGL_ANGLE_device_creation EGL_ANGLE_device_creation_d3d11 EGL_ANGLE_experimental_present_path EGL_KHR_client_get_all_proc_addresses
WebGL 2 Driver Renderer: Google Inc. -- ANGLE (Radeon RX 580 Series Direct3D11 vs_5_0 ps_5_0)
WebGL 2 Driver Version: OpenGL ES 3.0 (ANGLE 2.1.0.)
WebGL 2 Driver Extensions: GL_OES_element_index_uint GL_OES_packed_depth_stencil GL_OES_get_program_binary GL_OES_rgb8_rgba8 GL_EXT_texture_format_BGRA8888 GL_EXT_read_format_bgra GL_NV_pixel_buffer_object GL_OES_mapbuffer GL_EXT_map_buffer_range GL_EXT_color_buffer_half_float GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_float GL_OES_texture_float_linear GL_EXT_texture_rg GL_EXT_texture_compression_dxt1 GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_OES_compressed_ETC1_RGB8_texture GL_EXT_sRGB GL_ANGLE_depth_texture GL_OES_depth32 GL_EXT_texture_storage GL_OES_texture_npot GL_EXT_draw_buffers GL_EXT_texture_filter_anisotropic GL_EXT_occlusion_query_boolean GL_NV_fence GL_EXT_disjoint_timer_query GL_EXT_robustness GL_EXT_blend_minmax GL_ANGLE_framebuffer_blit GL_ANGLE_framebuffer_multisample GL_ANGLE_instanced_arrays GL_ANGLE_pack_reverse_row_order GL_OES_standard_derivatives GL_EXT_shader_texture_lod GL_EXT_frag_depth GL_ANGLE_texture_usage GL_ANGLE_translated_shader_source GL_EXT_discard_framebuffer GL_EXT_debug_marker GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_EGL_image_external_essl3 GL_NV_EGL_stream_consumer_external GL_EXT_unpack_subimage GL_NV_pack_subimage GL_EXT_color_buffer_float GL_OES_vertex_array_object GL_KHR_debug GL_ANGLE_lossy_etc_decode GL_CHROMIUM_bind_uniform_location GL_CHROMIUM_sync_query GL_CHROMIUM_copy_texture GL_EXT_texture_norm16
WebGL 2 Extensions: EXT_color_buffer_float EXT_texture_filter_anisotropic EXT_disjoint_timer_query MOZ_debug_get OES_texture_float_linear WEBGL_compressed_texture_etc WEBGL_compressed_texture_etc1 WEBGL_compressed_texture_s3tc WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_lose_context MOZ_WEBGL_lose_context MOZ_WEBGL_compressed_texture_s3tc
Hardware H264 Decoding: Yes; Using D3D11 API
Audio Backend: wasapi
Direct2D: true
DirectWrite: true (10.0.19041.3636)
GPU #1
Active: Yes
Description: Radeon RX 580 Series
Vendor ID: 0x1002
Device ID: 0x67df
Driver Version: 31.0.21905.1001
Driver Date: 10-17-2023
Drivers: aticfx64 aticfx64 aticfx64 amdxc64 aticfx32 aticfx32 aticfx32 amdxc32 atiumd64 atidxx64 atidxx64 atiumdag atidxx32 atidxx32 atiumdva atiumd6a
Subsys ID: 00000000
RAM: 8192

Diagnostics
AzureCanvasAccelerated: 0
AzureCanvasBackend: direct2d 1.1
AzureContentBackend: direct2d 1.1
AzureFallbackCanvasBackend: cairo





Important Modified Preferences
------------------------------

accessibility.typeaheadfind.flashBar: 0
browser.cache.disk.capacity: 358400
browser.cache.disk.parent_directory: c:\TEMP\Pale Moon
browser.cache.disk.smart_size.first_run: false
browser.cache.disk.smart_size.use_old_max: false
browser.download.importedFromSqlite: true
browser.places.smartBookmarksVersion: 4
browser.search.suggest.enabled: false
browser.startup.homepage: about:home
browser.startup.homepage_override.buildID: 20231221131038
browser.startup.homepage_override.mstone: 6.5.0
browser.tabs.closeWindowWithLastTab: false
browser.tabs.onTop: true
browser.tabs.warnOnClose: false
browser.tabs.warnOnCloseOtherTabs: false
extensions.lastAppVersion: 32.5.2
font.internaluseonly.changed: true
gfx.crash-guard.d3d11layers.appVersion: 32.5.2
gfx.crash-guard.d3d11layers.deviceID: 0x67df
gfx.crash-guard.d3d11layers.driverVersion: 31.0.21905.1001
gfx.crash-guard.d3d11layers.feature-d2d: true
gfx.crash-guard.d3d11layers.feature-d3d11: true
gfx.crash-guard.status.d3d11layers: 2
gfx.crash-guard.status.d3d11video: 2
gfx.crash-guard.status.d3d9video: 2
media.hardware-video-decoding.failed: false
network.cookie.cookieBehavior: 3
network.cookie.prefsMigrated: true
places.database.lastMaintenance: 1707211797
places.history.expiration.transient_current_max_pages: 108420
privacy.cpd.connectivityData: true
privacy.cpd.downloads: false
privacy.cpd.formdata: false
privacy.cpd.history: false
privacy.cpd.offlineApps: true
privacy.cpd.siteSettings: true
privacy.GPCheader.enabled: true
privacy.sanitize.migrateFx3Prefs: true
privacy.sanitize.timeSpan: 0
security.disable_button.openCertManager: false
security.disable_button.openDeviceManager: false
security.tls.hello_downgrade_check: false
services.sync.declinedEngines:
storage.vacuum.last.index: 1
storage.vacuum.last.places.sqlite: 1706445349
ui.osk.debug.keyboardDisplayReason: IKPOS: Touch screen not found.

Important Locked Preferences
----------------------------

Places Database
---------------

JavaScript
----------

Incremental GC: true

Accessibility
-------------

Activated: false
Prevent Accessibility: 1

Library Versions
----------------

NSPR
Expected minimum version: 4.35
Version in use: 4.35

NSS
Expected minimum version: 3.79.4
Version in use: 3.79.4

NSSSMIME
Expected minimum version: 3.79.4
Version in use: 3.79.4

NSSSSL
Expected minimum version: 3.79.4
Version in use: 3.79.4

NSSUTIL
Expected minimum version: 3.79.4
Version in use: 3.79.4

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35650
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: .jpg extension not recognized

Unread post by Moonchild » 2024-02-08, 11:44

Thanks - yeah not seeing anything there that would in itself lead to this behaviour.
It'll need some digging around in bugzilla to find where this behavior was changed maybe get some help from mozregression. I did find that this getting MIME types from the system isn't very robust and I already just now had to fix an issue in the front-end where it would simply bork, so there's a good chance we're missing some other safeguards in the platform for reading MIME types from the system so it could abort enumeration and simply not fall back to the default list.
Can't really look into that now as I'll be away on a trip for the coming week, but if anyone feels the calling... :)
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
LuftWafflePilot
Fanatic
Fanatic
Posts: 225
Joined: 2021-02-19, 20:46

Re: .jpg extension not recognized

Unread post by LuftWafflePilot » 2024-02-08, 13:33

It really is not important, just a little annoyance that would be great if changed.

User avatar
therube
Board Warrior
Board Warrior
Posts: 1651
Joined: 2018-06-08, 17:02

Re: .jpg extension not recognized

Unread post by therube » 2024-02-08, 17:16

If what I alluded to viewtopic.php?p=248416#p248416 is correct (& of which I have no idea), imgbox is one site that fails.

Code: Select all

<div class="boxed-content">
              <div>
				<span class="btn btn-warning fileinput-button select-files-button-large">
				      <i class="icon-cloud-upload"></i>
				       <span>UPLOAD IMAGES</span>
				       <input id="" name="files[]" accept="image/gif, image/jpeg, image/png" multiple="" type="file">
				</span>
              </div>
Note the use of name="files[]" vs name="files" (again, which I have no idea what it means).


And while we're at it, since it couldn't be said, https://imgur.com/upload, https://postimages.org/, https://imgbb.com/, https://freeimagehosting.net/, https://www.imagevenue.com/, are all fine.

Note the use of name="files[]" vs name="files" (again, which I have no idea what it means).
Actually, that might be irrelevant, because even the mdn example fails in that it finds .jpg but NOT .jpeg (in PM, where FF finds both).

User avatar
adoxa
Fanatic
Fanatic
Posts: 170
Joined: 2019-03-16, 13:26

Re: .jpg extension not recognized

Unread post by adoxa » 2024-02-09, 03:00

imgbox is a list of MIME types, whereas imgur is a list of extensions, so that explains the difference there (didn't check the other sites). With imgbox on Basilisk/Win10, I see "IrfanView JPG File (*.jpg)"; Firefox shows "JPEG Image (*.jpg;*.jpeg;*.jfif;*.pjpeg;*.pjp)". HKCR has .jfif, .jpe, .jpeg & .jpg defined as "image/jpeg" (I do not have associations for .pjpeg or .pjp); "HKCR\MIME\Database\Content Type\image/jpeg" has ".jpg" as Extension - presumably that is where IrfanView comes from (my association).

Lucio Chiappetti
Astronaut
Astronaut
Posts: 660
Joined: 2014-09-01, 15:11
Location: Milan Italy

Re: .jpg extension not recognized

Unread post by Lucio Chiappetti » 2024-02-09, 17:38

I always felt that the mechanism Pale Moon has inherited from Firefox to assocIate a handler to a MIME-type or file extension is poor in terms of editability with respect to a mechanism like good old Unix .mime.types and .mailcap. The snapshot shows a piece of my Preferences->Application as it developed across time though I won't be able to tell how I did it.
app.png
I am pretty sure I forced "JPEG image" and also "PNG image" to "Use Palemoon" to prevent attempts prompting odd things (like "Use Skype" ???). I am not sure how I ended up to have four entries for pdf files announced with different MIME types (unfortunately servers aren't always using just one), and why the actions associated to them aren't all the same. Unfortunately I cannot make a snapshot of the opened action menu, but fortunately the one which shows up usually displays a prompt like this
pdf.png
The viewer menu has 2 or 3 options (atril, evince and Acroread), so I am able e.g. to use atril (which is lighter and faster) as viewer, but to turn to Acroread before ticking on Save because it offers a better menu to navigate and place the file where I want (note I run without a DE but with a WM).
You do not have the required permissions to view the files attached to this post.
The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. (G.B. Shaw)

User avatar
athenian200
Contributing developer
Contributing developer
Posts: 1537
Joined: 2018-10-28, 19:56
Location: Georgia

Re: .jpg extension not recognized

Unread post by athenian200 » 2024-02-09, 20:10

Is there some way we could just have both .jpg and .jpeg extensions associated with the image/jpeg MIME type if the OS doesn't have anything in the registry to override that association? Like, is there actually any code in our codebase that falls back to only associating the .jpeg extension with image/jpeg if it finds nothing in the registry, or is the entire mechanism completely dependent on what the OS has in the registry with no fallback whatsoever?

Like, overall, I think associating both of those with image/jpeg is a safe assumption... to the point that I don't see it as ridiculous to hard-code that in if needed, but would ideally like to allow the OS to override it in case someone has some obscure program that uses .jpg files as something other than JPEG images.

EDIT: Found this, wondering if it's related?

https://xref.palemoon.org/goanna-centra ... ble.idl#31

I don't think image/jpg is a valid MIME type, right? At least, I've never heard of it before...

But hypothetically, if we're associating .jpg with image/jpg internally, and the website is only looking for image/jpeg, then...
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind

Lucio Chiappetti
Astronaut
Astronaut
Posts: 660
Joined: 2014-09-01, 15:11
Location: Milan Italy

Re: .jpg extension not recognized

Unread post by Lucio Chiappetti » 2024-02-09, 21:20

athenian200 wrote:
2024-02-09, 20:10
I don't think image/jpg is a valid MIME type, right? At least, I've never heard of it before...
I tried to search for an official list of registered MIME types but found only unofficial ones. Looks like it is image/jpeg.
Edit: or is this ? https://www.iana.org/assignments/media- ... ypes.xhtml
In the .mailcap vs .mime.types framework, one thing is the association between a MIME type and a handler, and another the association between the MIME type and list of extensions. For instance my mail agent, who honours such files, when viewing an attachment whise announced MIME type does not match the extension, asks for confirmation whether I want to use a viewer chosen by file extension.
The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. (G.B. Shaw)

User avatar
athenian200
Contributing developer
Contributing developer
Posts: 1537
Joined: 2018-10-28, 19:56
Location: Georgia

Re: .jpg extension not recognized

Unread post by athenian200 » 2024-02-09, 21:59

Lucio Chiappetti wrote:
2024-02-09, 21:20
In the .mailcap vs .mime.types framework, one thing is the association between a MIME type and a handler, and another the association between the MIME type and list of extensions. For instance my mail agent, who honours such files, when viewing an attachment whise announced MIME type does not match the extension, asks for confirmation whether I want to use a viewer chosen by file extension.
Yeah, that's pretty much how I would have assumed MIME types work. The image/jpeg MIME type would be associated with an application that handles it (like GIMP or MS Paint), and then in turn the .jpg and .jpeg file extensions would be associated with the same image/jpeg MIME type, and thus get handled in the same way. It seems the logical/intuitive way for that to work, right? I mean, we have several "pairs" of extensions with the same problem. There's .htm and .html (which should both be text/html), etc...
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind