Duotone can’t handle JPEG file extension?
I tried shifting my blog to duotone, but when I did so all my pictures disappeared. Checking the source code I see this:
[code]<img src="http://visualdash.files.wordpress.com/2009/12/l_1600_1200_cc95ec47-fd52-407e-ac90-2d86db344b2e.jpe?w=840" alt="" class="alignnone size-full wp-image-364" />[/code]
You’ll notice that the extension on the image file is only “jpe” instead of “jpeg”. When I look at the source in the backend editor, and when I look at the generated source using Monotone, it has the full “jpeg.”
Is duotone accidentally stripping file extensions down to only three letters?
The blog I need help with is visualdash.wordpress.com.
It shouldn’t be changing the extension at all as long as it is a legal extension, and the extension should be .jpg (lowercase with no “e”. .jpeg is not a legal file extension.
.jpeg is a legal extension. Check here: http://en.wikipedia.org/wiki/Jpeg. Many file extensions have only three letters (Windows convention from of old), but not all. Both .jpg and .jpeg are legal.
What’s happening here is that I take a photo with my iPhone and upload it using the WordPress 2 iPhone application. It gives it a filename that ends in .jpeg. (Incidentally, if I email the photos to myself they come through as photo.jpg, so the WordPress iPhone app creators themselves must be choosing the four letter extension.)
In the backend I have this code:
<img src=”http://visualdash.files.wordpress.com/2009/12/l_1600_1200_680482fc-887e-4f80-903f-852ed19d08bf.jpeg” alt=”” width=”300″ height=”225″ class=”alignnone size-full wp-image-364″ />
With the Monotone theme activated, I get this:
<img src=”http://visualdash.files.wordpress.com/2009/12/l_1600_1200_680482fc-887e-4f80-903f-852ed19d08bf.jpeg?w=840″ alt=”” class=”alignnone size-full wp-image-364″ />
<img src=”http://visualdash.files.wordpress.com/2009/12/l_1600_1200_680482fc-887e-4f80-903f-852ed19d08bf.jpe?w=840g” alt=”” class=”alignnone size-full wp-image-364″ />
Clearly, Duotone is somehow dropping off the “g” at the end of the filename. It may be trying to grab the last three letters of the filename for the purpose of processing the image (so it can set the theme colors to match) and for some reason this ends up chopping off any other letters. Who knows.
Anyhow, clearly something isn’t working correctly.
Yes, that’ll have to be fixed. As will the centering issue (photos used to be centered and now they’re left-aligned. We’ll have to make a thread (or nominate one) for bug reports on Duotone.
You know, as far as my experience, WP has always chocked on 4-letter extensions. If Monotone accepted 4-letter extensions, that was probably a mistake since Linux, what virtually the entire web runs on, doesn’t like 4-letter extensions (except for .html). Windows server will accept 4-letter extensions, but who in the world would use Windows web servers?
shouldn’t it determine the file format by the magic number? instead of extensions?
No, it’s never done that. You can test it by changing a JPG’s name to whatever.bmp and trying to upload it; it won’t go.
In this particular case, it looks like either Duotone will have to be fixed (which it will be; all themes need tuneups at first) or the WordPress 2 iPhone application needs fixing, so it doesn’t convert files to Jpeg.
The centering issue must also be addressed. On my test blog, some pictures centered, some did not. And pasting code from one post to another did not seem to make sense re what happened…
Could be an interesting theme though.
I think it’s actually the other way around. Historically, it didn’t matter for Linux/Unix whether you even had an extension. The FAT filesystem on Windows, however, had the 8.3 convention, which limited you to three letters.
As the iPhone runs on Unix, it figures that they wouldn’t care between jpeg and jpg; both are perfectly valid. It’s Duotone that needs to be fixed. We all wish you could test on the magic number, but it’s not really done.
I’ll be switching to Duotone as soon as they fix this.
I’m getting an error on a fresh install of wordpress 2.9 and fresh install of Duotone theme.
Warning: Missing argument 1 for is_vertical(), called in /var/www/wp/wp-content/themes/duotone/functions.php on line 18 and defined in/var/www/wp/wp-content/themes/duotone/inc/duotonelibrary.php on line 295
None of my photos are showing up, just that error.
New themes always need debugging. Thanks Noel. :)
The topic ‘Duotone can’t handle JPEG file extension?’ is closed to new replies.