oseawey / timthumb

Automatically exported from code.google.com/p/timthumb
0 stars 0 forks source link

SEO Issues with Timthumb #182

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello

I am a Web Designer and would like to discuss the SEO for timthumb generated 
images. I found out that images on my blog were indexed by google but they were 
all indexed as timthumb.php and are a PHP type.

I read that using the below code in the .htaccess file could help but I am 
unsure

RewriteRule ^images/thumb/(.*) timthumb.php?filename=$1

I think this should be built in timthumb to redirect permanently to the 
original image source when viewed directly or by search engines.

This would surely increase the use of timthumb on internal pages too else its 
just limited to generate thumnnails... forexample I added pictures 1024*768 for 
my portfolio but instead of resizing I am thumbing it to 640*480 with zoom 0 
but those are not getting indexed.

Hope something is done here mate!

cheers
pushpinder

Original issue reported on code.google.com by pushpind...@gmail.com on 23 Apr 2011 at 9:19

GoogleCodeExporter commented 9 years ago
anything yet?

Original comment by pushpind...@gmail.com on 2 May 2011 at 3:35

GoogleCodeExporter commented 9 years ago
I think that using a RewriteRule in .htaccess file is more fast and easy to 
implement instead to encode it in the php file.

However this should work

RewriteRule timthumb-src-(.*)-h-(.*)-w-(.*)\.jpg$ timthumb.php?src=$1&h=$2&w=$3

Original comment by ldanze...@gmail.com on 10 May 2011 at 10:44

GoogleCodeExporter commented 9 years ago
Thanks for the reply mate albeit what about the cropping once this is 
implemented?

Would timthumb.php still crop these images?

Original comment by pushpind...@gmail.com on 10 May 2011 at 10:50

GoogleCodeExporter commented 9 years ago
RewriteRule timthumb-src-(.*)-h-(.*)-w-(.*)-zc(.*)\.jpg$ 
timthumb.php?src=$1&h=$2&w=$3&zc=$4

Original comment by ldanze...@gmail.com on 10 May 2011 at 10:51

GoogleCodeExporter commented 9 years ago
What I mean is what will this again effect on the SEO?

forexample we have /images/image1.jpg which now becomes what?

what I tried earlier was similar which in this "timthumb.php?src=$1&h=$2&w=$3" 
301 redirected to $1 which is the image url but then it did not crop... 

Original comment by pushpind...@gmail.com on 10 May 2011 at 10:55

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
What I mean is suppose we have this scenario

timthumb.php?src=website.jpg&w=145&h=80&zc=1&q=100

the solution suggested makes this supposedly like

timthumb-src-website-h-80-w-145-zc1.jpg which is the 145x80 cropped version of 
the image... right?

Original comment by pushpind...@gmail.com on 10 May 2011 at 11:07

GoogleCodeExporter commented 9 years ago
Yes this is right

Original comment by ldanze...@gmail.com on 10 May 2011 at 11:11

GoogleCodeExporter commented 9 years ago
Well then I suggest why not keep it to 301 redirect to that the search engines 
see it as a regular thumbnail - what say?

Original comment by pushpind...@gmail.com on 10 May 2011 at 11:14

GoogleCodeExporter commented 9 years ago
Doesn't work.

I tried 

RewriteRule thumbnail-(.*)-h-(.*)-w-(.*)-zc(.*)-q(.*)\.jpg$ 
timthumb.php?src=$1&w=$2&h=$3&zc=$4&q=$5 [R=301,L]

It doesn't redirect :(

Original comment by pushpind...@gmail.com on 10 May 2011 at 11:18

GoogleCodeExporter commented 9 years ago
For seo i think that is better to serve directly the cahced file name.

For example with timthumb.php?src=website.jpg&w=145&h=80&zc=1&q=100

the image website.jpg is cached with name 123456543.jpg in the cache folder.

Why not to serve directly this?

On this article http://code.google.com/speed/page-speed/docs/caching.html

in the section "Use fingerprinting to dynamically enable caching" the name used 
in the cache folder for the image file name generates a url "fingerprinting" 
useful for browser cache and for the SEO to know if the image has changed.

Original comment by ldanze...@gmail.com on 10 May 2011 at 11:20

GoogleCodeExporter commented 9 years ago
seems like a better solution but this should be implemented in timthumb.php 
only... it surely can't be done by .htaccess...

Original comment by pushpind...@gmail.com on 10 May 2011 at 11:28

GoogleCodeExporter commented 9 years ago
The cache file name is never going to be an seo indexable string, so there's 
little point in redirecting to the cached file in my opinion. If you want the 
images to be indexable then I would suggest using some sort of rewrite rule as 
mentioned above.

Original comment by BinaryMoon on 6 Aug 2011 at 7:57

GoogleCodeExporter commented 9 years ago
But sadly the rewrite rule is not working... we need a perfect solution which 
is not working... I tried but failed to make one...

Original comment by pushpind...@gmail.com on 6 Aug 2011 at 12:05

GoogleCodeExporter commented 9 years ago
Does anyone have any updated suggestions on this? I've tried implementing 
LDanze's rewriterule but it doesn't seem to work.

TimThumb seems to be an image SEO killer. ;)

Original comment by anthony....@gmail.com on 19 Nov 2011 at 9:38

GoogleCodeExporter commented 9 years ago
I tried this rewrite method but it's not working ...

Original comment by fly...@gmail.com on 15 Jun 2012 at 5:40

GoogleCodeExporter commented 9 years ago
I have a solution for this problem, read this, it's in danish, but u can 
translate it:
http://www.ktj-media.dk/blog/timthumb-bruger-venlig/

Solution is:
RewriteEngine On
RewriteRule ^thumb/([0-9]*)x([0-9]*)/(.*) 
URL-to-timthumb/timthumb.php?src=http://www.ditdomæne.dk/$3&h=$2&w=$1&c=1&q=100

([0-9]*) = width
x
([0-9]*)= height
/(.*) = Image URL

when u call the image, it should be:
/thumb/200x200/original-url-to-the-image.jpg

Original comment by ktjme...@gmail.com on 10 Aug 2012 at 6:13

GoogleCodeExporter commented 9 years ago
Add a 301, L to it and should seal the deal - let me try and get back. Thanks!

Original comment by pushpind...@gmail.com on 10 Aug 2012 at 5:33

GoogleCodeExporter commented 9 years ago
ohh yes, from timthumb.php?blabla to new and seo friendly image URL.

Original comment by ktjme...@gmail.com on 13 Aug 2012 at 11:38