benbyf Posted March 21, 2016 Share Posted March 21, 2016 new site for photographer Nick Graham working with design agency Each. http://nickgraham.co.uk/ 5 Link to comment Share on other sites More sharing options...
DaveP Posted March 21, 2016 Share Posted March 21, 2016 I'm getting a strange double vertical scrollbar. Chrome, Win7, 1600x900 <edit>The scrollbar in the image is the extra one, the 'normal' one wasn't in the screencap.</edit> 1 Link to comment Share on other sites More sharing options...
benbyf Posted March 21, 2016 Author Share Posted March 21, 2016 Thanks! Hopefully fixed now, I had too many overflow auto's going on. Link to comment Share on other sites More sharing options...
DaveP Posted March 21, 2016 Share Posted March 21, 2016 Thanks! Hopefully fixed now, I had too many overflow auto's going on. Cured it for me. Link to comment Share on other sites More sharing options...
bernhard Posted March 25, 2016 Share Posted March 25, 2016 hi benbyf, the images are tremendously huge!! the first for example is 2248x3000 @ 1.9MB it's so easy to fix this with PW: <img src="<?= $page->your_image->size(1000, 1000, array('cropping' => false))->url ?>" alt="..."> and it will keep its aspect ratio. keep in mind that on first load it will need lots of memory + cpu so there may be some timeouts, but when all the images are resized the following pageloads will be faster 3 Link to comment Share on other sites More sharing options...
Christophe Posted March 29, 2016 Share Posted March 29, 2016 "the images are tremendously huge!! the first for example is 2248x3000 @ 1.9MB" With tinypng/tinyjpg it becomes 189.0 KB (−91%)... @bernhard: <img src="<?= $page->your_image->size(1000, 1000, array('cropping' => false))->url ?>" alt="..."> Does this code mean that the dimension closest to 1000 will have this value, and that the other dimension's new value will be proportional? Edit: the opposite had more sense. 1 Link to comment Share on other sites More sharing options...
horst Posted March 30, 2016 Share Posted March 30, 2016 The owner of the site is a professional photographer, who needs to show (his) images at its best. And I suppose that his main clients are agencies / artdirectors who uses 30" monitors. Any regular "webimageshrinkingtool" is counterproductive here, I believe. 3 Link to comment Share on other sites More sharing options...
bernhard Posted March 30, 2016 Share Posted March 30, 2016 @horst if that kind of full res images are really needed i would present lower quality images and make a link somewhere "show/download full res image", don't you think? @chris have a look at the docs. all the options and what they do are well explained here: https://processwire.com/api/fieldtypes/images/ edit: my example creates a new image with maximum dimensions of 1000px (height OR width) and keeping the original aspect ratio 3000x2000 would get 1000x666 2000x3000 would get 666x1000 500x500 would get 500x500 (see option "upscaling") 1 Link to comment Share on other sites More sharing options...
AndZyk Posted March 30, 2016 Share Posted March 30, 2016 @bernhard You could also use the maxSize method: $thumb = $image->maxSize($width, $height); This method does also resizing without cropping. Too bad this nice method is only documented in the blog post and cannot be found through the site search. Hopefully the documentation will be updated with the stable release of ProcessWire 3. 1 Link to comment Share on other sites More sharing options...
bernhard Posted March 30, 2016 Share Posted March 30, 2016 @AndZyk no, that would be too easy :D Link to comment Share on other sites More sharing options...
Christophe Posted March 31, 2016 Share Posted March 31, 2016 @bernhard I had seen the page https://processwire....ldtypes/images/. The fact that until now, I have most often, if not always, "deactivated" these kinds of options in config.php (like cropping and other ones) and that the times I have used size, with the width and height chosen and/or with the dimensions of the images, I haven't had the opportunity to notice how it really worked, made me think that it was something different. I simply haven't used it enough. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now