Closed GoogleCodeExporter closed 9 years ago
anything yet?
Original comment by pushpind...@gmail.com
on 2 May 2011 at 3:35
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
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
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
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
[deleted comment]
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
Yes this is right
Original comment by ldanze...@gmail.com
on 10 May 2011 at 11:11
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
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
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
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
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
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
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
I tried this rewrite method but it's not working ...
Original comment by fly...@gmail.com
on 15 Jun 2012 at 5:40
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
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
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
Original issue reported on code.google.com by
pushpind...@gmail.com
on 23 Apr 2011 at 9:19