ImageResize

by adamh

Show:

sufiansays

nice work

Posted 6 months ago

adamhsays

Author

Glad you like it. Any suggestions, let me know

Posted 6 months ago

salamfallsays

How can I integrate this in a php MVC artchitecture /news/article/article_name

Posted 6 months ago
Author

Default-user adamhreplied

If you put the script in the root of your app (as per the instructions doc), you can resize any image within the root by adding query string parameters

eg path/to/image.jpg?width=100

If you want to have fully friendly urls for the resized images too, you could add a mod_rewrite rule so that you could refer to the image above as:

path/to/image.jpg/width/600/height/400

Does that answer your question?

Posted 6 months ago

dirty_densays

Purchased

Doesnt seem to work for me :( uploaded to windows server in a subfolder and get error ‘image cannot be found’ so I think ther may be a path script error for this server set up.

Also tried uploading on the same server to a site root as you suggest and still the same error using your sample files.

Can you suggest a code fix assume the error is caused around the define path lines in the php class?

We shouldnt need apache mod rewrite or the ht access for this to work, only for rewritten sef urls. Its doesnt say it is only for linux.

I prefered this script than the other similar one on here because of the cropping functionality.

Thanks

Posted 6 months ago
Author

Default-user adamhreplied

The script requires mod_rewrite only for friendly urls – mod_rewrite can be installed on windows/iis using a plugin such as Isapi Rewrite (www.isapirewrite.com).

The script can still be used without mod_rewrite, using query strings. Just put your source image in the source query string:

/path/to/resize.php?source=/path/to/image.jpg&width=100

I hope that helps – let me know either way.

Posted 6 months ago

dirty_densays

Purchased

Yes I have this ISAPI rewrite filter already installed but dont require the urls changing. I already did exactly as you said. the image is visible and pointing to the correct path previously. But when I add the suffix eg

&width=100 I get the error. Ill try it on another server tomorrow, Maybe it is a server path issue.

Posted 6 months ago
Author

Default-user adamhreplied

I didn’t hear back from you – assuming the script is working ok? Let me know if not

Posted 5 months ago

adamhsays

Author

The problem is that the path to your image is wrong. Can you send me the link you’re using to resize as well as a link to the original image so I can try to debug?

Posted 6 months ago

argosmediasays

What is the practical use of this script? It does not really resize pictures, it just visually resizes them. So big pics stay big, but they only appear smaller. This is effectively the same as good old height=”x” and width=”x” HTML parameters. I don’t understand the advantage of this script. Do I miss something?

Posted 5 months ago
Author

Default-user adamhreplied

It resizes images on the fly, so the image served to the browser is a smaller file size. If you use html width and height attributes, the full-sized file is served, resizing is done by the browser (badly and out of proportion) and your code won’t be valid xhtml.

The script can easily be updated to permanently save the resized images.

The script can also crop and stretch images as required.

Posted 5 months ago

argosmediasays

Oh I’m sorry, you’re right. I think I didn’t check well the first time…

Posted 5 months ago

dgoujardsays

Script need GD and ImageMagic for transparency ?

Posted 5 months ago
Author

Default-user adamhreplied

Just GD

Posted 5 months ago

dgoujardsays

Purchased

Ok, i have buy this script but i need add in get quality=5 without quality i have error. And png without transparency !!! i have test with http://www.noelshack.com/up/aac/kevgil-angel-or-devil-tux-a77bc95f70.png and when i resize i have an black background… http://www.noelshack.com/up/aac/kevgil-angel-or-devil-tux_o-2a931f7f14.png

i have buy this script for transparency….

Posted 5 months ago
Author

Default-user adamhreplied

I’ve added a new version of the script which fixes the png transparency issues – it’ll be up as soon as ThemeForest approve it.

It also fixes any quality issue. Sorry for the inconvenience.

Posted 5 months ago
Purchased

Default-user dgoujardreplied

Thank you very mutch :)

Posted 5 months ago
1 More Reply
Purchased

Default-user dgoujardreplied

And work :) thank you very mutch

Posted 5 months ago

adamhsays

Author

You can change the quality by adding quality=50 (or whatever). Default quality is 80.

I’ll have a look at the transparency issues and get back to you asap.

Posted 5 months ago

adamhsays

Author

Glad to see people using the script – does anyone have any feature requests? Thinking about what to add to the next version.

Posted 4 months ago

ryan44says

Purchased

I’m having a problem, the script resizes and crops great, but sometimes the images don’t load properly. i.e. if you refresh the page, some will display, refresh again, and none show.

Any ideas what’s causing this?

Posted 11 days ago
Author

Default-user adamhreplied

Hi Ryan

As ImageResize is server-side, the only thing I can think is that you (or your server) may be adding to or modifying the cache headers on the outputted image. Can you check to see if the problem affects the following image:

http://adamhopkinson.co.uk/classes/resize/images/spitfire.jpg?height=200

If not, please report back what browser you are using as well as what PHP version and GD version. You can get this by calling phpinfo().

Thanks, Adam

Posted 10 days ago

$8

Prepaid customers
pay just $6 - how? Prepay Your Account With our deposit system not only will purchasing be much faster, but we’ll also take $2 off the price! Find Out More Price

You must sign in or sign up to purchase this item.

12345 ( 8 ratings )

Purchase 37 purchases

File Types Included
PHP
Item Attributes
Created 19 September 09
PHP Version 4.x
MySQL Version N/A
Compatible Browsers FireFox 2, FireFox 3, IE6, IE7, IE8, Safari
ThemeForest Files Included N/A
PHP Files Included PHP
PHP Framework N/A
Collections that include this item