Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thumbnails from images without extenstion #18

Closed
GoogleCodeExporter opened this issue Feb 1, 2016 · 5 comments
Closed

Thumbnails from images without extenstion #18

GoogleCodeExporter opened this issue Feb 1, 2016 · 5 comments

Comments

@GoogleCodeExporter
Copy link

I use syndication to fulfil my blog, and some of sources use images without
any extension. Wordpress can handle it and auto detects what kind of mime
file is it and shows pictures properly, but timthumb doesn't show
thumbnails on main page (only files with jpg, jpeg, png, gif are supoorted).

Example:
Image filename: a414f_6a00e55281006188330111684d412c970c-500wi (no extension)

so the timthumb thumb. image file name looks like that:

http://www.thegaypaper.com/wp-content/themes/arthemia-premium/scripts/timthumb.p
hp?src=http://www.thegaypaper.com/wp-content/plugins/wp-o-matic/cache/a414f_6a00
e55281006188330111684d412c970c-500wi&w=80&h=80&zc=1&q=100

Is there any way I can modify timthumb or add possibility to auto detect
mime type in timthumb if image file doesn't have any extension?



Original issue reported on code.google.com by westend...@gmail.com on 10 Feb 2009 at 2:30

@GoogleCodeExporter
Copy link
Author

hmmm interesting. Hadn't considered this at all, I will add it to the todo list.

Original comment by BinaryMoon on 16 Feb 2009 at 6:39

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

I gather this same issue would also stop me altering the icons/avatar's of 
comment 
posters.  I would be nice to remove the external URL linking for these little 
objects.

An Example of a gravatar icon URL:
http://www.gravatar.com/avatar/bd392f11e5b1a856ed79663775dc2bf8?s=32&d=identicon
&r=G

Original comment by avatarw...@gmail.com on 11 Feb 2010 at 7:40

@GoogleCodeExporter
Copy link
Author

Hello,  Just had a quick look at my problem to timthumb my gravatar URLs;  I'm
running FreeBSD and noticed that preg_match in the function mime_type says the 
following:

    if (!valid_src_mime_type($mime_type) && $os != "WIN") {
        if (preg_match("/FREEBSD|LINUX/", $os)) {

I changed this to 

    if (!valid_src_mime_type($mime_type) && $os != "WIN") {
        if (preg_match("/FreeBSD|LINUX/", $os)) {

you could bave done case insensitive matching; but the $os value returns 
'FreeBSD' at
least for me running FreeBSD 6.4 ;with mostly latest other software.

This allows the 'file' directive to return a value

Hope this helps 

Original comment by avatarw...@gmail.com on 11 Apr 2010 at 6:02

@GoogleCodeExporter
Copy link
Author

Seeing this with my blog, as well, using a Graph Paper Press theme (which 
embeds timthumb.php to generate thumbnails) and the Photoshelter plugin, which 
adds images to posts using a URL that looks like: 
http://www.photoshelter.com/img-get/I0000vQCP.lyrVMg/s/590 - the filename of 
the image returned is just "590" with no extension. Obviously, timthumb can't 
be responsible for the URL that the Photoshelter plugin generates, and I have a 
workaround (append "/590/thumbnail.jpg" to the URL above). Just wanted to point 
out another use case...

Original comment by davereph...@gmail.com on 28 Jul 2010 at 8:08

@GoogleCodeExporter
Copy link
Author

this has now been implemented - woo hoo :)

Original comment by BinaryMoon on 25 Sep 2010 at 10:22

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant