VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Development & Testing => Topic started by: hpolimar on May 22, 2012, 11:06:24 AM

Title: file .jpeg resizing
Post by: hpolimar on May 22, 2012, 11:06:24 AM
hi!
i found something strange but i could not test it with a fresh new installation:

if for a product i upload a file .jpeg (and not .jpg), the image uploaded will be renamed to file.jpeg.jpg and so the resized one, but automatically virtuemart in the image resized location, put the filename as .jpeg instead of .jpeg.jpg, so the image is not displayed cause of wrong filename
Title: Re: file .jpeg resizing
Post by: emicoma on August 07, 2013, 23:07:03 PM
Hi
Have you found out ?
tried to modify img2thumb.php but no succes for now...
Title: Re: file .jpeg resizing
Post by: davidk20 on October 02, 2013, 10:46:31 AM
Hello,

Did you find a fix for this? I am also having the same problem.

Cheers,
Dave
Title: Re: file .jpeg resizing
Post by: davidk20 on October 02, 2013, 11:32:50 AM
I think I have found a fix.

Before uploading your jpeg files you must make sure that the file extension says .jpg and NOT .jpeg.
Title: Re: file .jpeg resizing
Post by: d0ublezer0 on June 09, 2016, 12:25:31 PM
Hi! I think it is not normal.
.jpeg and .jpg have the same content inside them.
Why not to allow .jpeg extension? And process him as .jpg?
Title: Re: file .jpeg resizing
Post by: d0ublezer0 on May 15, 2020, 14:02:21 PM
After almost 8 years problem is still here. Why just not allow to resize .jpeg files?
Title: Re: file .jpeg resizing
Post by: loppan on May 15, 2020, 15:40:50 PM
Quote from: d0ublezer0 on May 15, 2020, 14:02:21 PM
After almost 8 years problem is still here. Why just not allow to resize .jpeg files?
Yeah, you're right, I ran into this problem last week. Took a while to figure out. I already have a habit of saving as .jpg (because DOS was my first OS :D) so I haven't noticed this until now, when I instead let a team member edit some product pics for me, and he delivered them as .jpeg.

A fix would be great in case I have already forgotten about this the next time I receive files from someone else :D

Best

Peter

Sent from my S41 using Tapatalk

Title: Re: file .jpeg resizing
Post by: jenkinhill on May 15, 2020, 15:54:47 PM
.jpg was simply born out of a limitation that existed by original versions of Windows or DOS that could only use a 3 letter suffix, and by default has become is actually the most common format over that of .jpeg.  I have not received .jpeg files from any of my clients for probably at least 10 years now and for my own photography, I generally use RAW and finally save as PNG-24 or .jpg

Nobody seems to have mentioned this on the forum for the last 4 years before today so I suspect it is of no importance to other VM users.  Pleease feel free to donate conversion code to the core if you feel it is important enough.
Title: Re: file .jpeg resizing
Post by: pinochico on May 15, 2020, 23:14:23 PM
Kelvyn:

Thanks


loppan:

I don't see in Joomla in setup for Media for Legal Image Extensions (File Types) - "jpeg" extension.
Why do you think this is a mistake, if .jpeg don't resizing?

I would never use the jpeg extension because I know it's not in the basic settings
Title: Re: file .jpeg resizing
Post by: d0ublezer0 on May 18, 2020, 18:15:19 PM
This is because when you add and save image, the actual file extension of thumbnail changes to .JPG, when saving to disk. And at the same time in the database the string is saved as .JPEG.
As a result, we get a link to a non-existent thumbnail.
If you open html page code and replace .jpeg with .jpg on broken link, then the image is displayed correctly. Check it out for yourself.
Isn't that a mistake?
Title: Re: file .jpeg resizing
Post by: Jörgen on May 19, 2020, 08:01:37 AM
Naming the thumbnail with .jpeg is a glitch, probably well meant but not 100% executed. Right now You have a workaround. Rename all your .jpeg files before upload to jpg.

Jörgen @ Kreativ Fotografi
Title: Re: file .jpeg resizing
Post by: d0ublezer0 on July 20, 2020, 15:52:42 PM
Step by step instructions on how to get a .JPEG file in 2020:

1. Take iPhone in your right hand. Or with your left hand, if you like.
2. Take a photo of a sleeping cat or someone else.
3. Write an email and attach this photo.
4. You will get a .jpeg extension for the attached file.
5. Profit?

Or your business partners can install Bitrix as a CMS and provide you with XML export of their products.
All image files in this XML feed will be .JPEG

No need to tell me about file naming standards and glitches. Sometimes a situation arises that you cannot influence. Our developers must find a workaround to solve this problem: VM does not recognize .JPEG files. .JPG only

Is it so hard to add two lines of code?
Title: Re: file .jpeg resizing
Post by: pinochico on July 20, 2020, 16:01:32 PM
Sometimes yes, I think :D

My grandma said me - when I don't want to, it's worse than when I can't...
Title: Re: file .jpeg resizing
Post by: jjk on July 20, 2020, 21:36:05 PM
Quote from: d0ublezer0 on July 20, 2020, 15:52:42 PM
VM does not recognize .JPEG files. .JPG only

Perhaps this does what you want for your special case: https://github.com/piliop/Vm-create-jpeg-img-thubs
Title: Re: file .jpeg resizing
Post by: d0ublezer0 on July 21, 2020, 07:29:08 AM
Quote from: jjk on July 20, 2020, 21:36:05 PM
Perhaps this does what you want for your special case: https://github.com/piliop/Vm-create-jpeg-img-thubs
The best answer about this issue!
Thank you!