• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed Image Downloading?


XenForo developer
Staff member
It's not actually an mp4. When I rename the downloaded file to .jpg, it displays correctly. I wonder if this was uploaded as an image with that extension? If so, I think we may need to check the contents vs the extension and normalize it. I'll move this to bugs for further investigation.
How strange, definitely a .jpg and not an .mp4

Any idea regarding the downloading too? I thought the "share image" link allows me to share just the image?

Chris D

XenForo developer
Staff member
The original image is deleted now. Ideally you should have kept it uploaded so we could take a closer look if necessary.

To be clear, that was a media item which displayed as an image when viewing the URL, but downloaded as an MP4 file when the share link was shared?

The situation as described is pretty much impossible.

Allowed file types are separate between video and image uploads - to upload an MP4 as an image, you would need to specifically allow MP4 as an allowed image file type, which I am assuming didn't happen, because that would be odd.

If you rename a JPG file to have an MP4 extension, the upload will fail because "The contents of the uploaded image do not match the file's extension"

So, I'm not totally sure how this could happen.

Do you have any add-ons that may affect the Gallery or attachment system? Have you ever made any manual database changes with Gallery tables or the attachment tables? Was the media imported from another gallery or uploaded directly into XFMG?
Sorry, I thought I'd try re-uploading through a difference PC...

Here's the same photo, https://veganforum.co.uk/media/20150919_163945666.145/

and another https://veganforum.co.uk/media/20150913_121235932_ios.144/

It seems to happen with panoramic photos only?

I've done nothing to the photo I uploaded from my mobile, also no addons that to my knowledge mess around with media gallery.

I'm more than happy to provide a test account for you to upload any panoramic photo...?

I've just downloaded and uploaded this https://upload.wikimedia.org/wikipedia/commons/e/ea/Sydney_Harbour_Bridge_night.jpg

Same result https://veganforum.co.uk/media/sydney_harbour_brid4e_ni4ht.148/

As I mentioned above it's only happening with large images I don't know if the size of the actual photo or the resolution may be why this is happening?

Chris D

XenForo developer
Staff member
Uploading directly from mobile could be relevant, and the type of image... Still confusing, but I will see if I can reproduce this.

Was the upload done via Safari or Chrome iOS?

Chris D

XenForo developer
Staff member
Well, that's interesting.

I just uploaded a (rather poor) panoramic image I took last week from my iPhone 6 Plus using Safari. That downloads as an mp4g file...
I've uploaded from Chrome on IOS and Chrome/Edge on Windows 10 same result.

I take it that you've reproduced the same on this forum?
Last edited:

Chris D

XenForo developer
Staff member
This is fixed, now, thanks again.

There was a bit of dodgy logic related to ascertaining whether a file is an image or a video. The code (wrongly) assumed that if the image couldn't be resized then it must be a video, hence it gets uploaded and treated as if it was a video. I've just refactored this a fair bit and this works better, now.