Jump to content

PW 3.0.63: Client-side image resize support


ryan
 Share

Recommended Posts

Client-side image resizing has been on our roadmap for awhile, and this week we've got it ready on the dev branch in version 3.0.63. People expressed interest in this feature in the comments to last week's post, and I promised to give it a closer look sooner rather than later. After getting that closer look, and doing some research, I realized we could get in this week's version. After using it now for a couple of days this week, I think people are really going to like this feature, and it works a lot better than I had originally guessed it could.

https://processwire.com/blog/posts/processwire-3.0.63-adds-client-side-image-resizing/

  • Like 24
Link to comment
Share on other sites

@ryan, I want to let you know I really admire the way you get things done! Every time you solve a problem it is an example of a perfect engineer solution. Spot a chance to create a feature everybody wants but few have, examine existing solutions present, learn from them, build on them, make them work better than before, deliver a working feature within a reasonable time frame, provide comprehensive docs right there in the code for tech people, write a press release for the end users, move on to another task.

Way back I once started a topic called "What is "Reiska". I think now I can feel  what @apeisa and others at Avoine meant by this title. There is such a word in every language, and all of them fit you and your type of people (of which there is quite a few here in forums, luckily).

I sometimes find myself questioning some of your marketing and organizational decisions, but I always applaud to and try to learn those problem solving skills and mindset from you. ProcessWire is unique thing, that inspired my way from "anykey clicking" web development to managing to read and write some relatively complicated code.

I try hard to provide my clients with the best engineer solutions they can get based on ProcessWire. Because I can, and because it so exiting to do with PW, and because this is the way real stuff should be done. Thanks for the inspiration.

  • Like 14
Link to comment
Share on other sites

hi ryan,

first let me say thank you for that great addition!! it's always impressive how you not only integrate existing solutions but also improve them :)

first tries on my laptop went very well. on my android phone i got this problem:

original image:

IMG_20170526_190245.thumb.jpg.0d12a170021100547e6249a5e1e4ded1.jpg

resize settings:

59293e8242e03_2017-05-2710_50_01-EditField_galleryjvplf.dimacon_at.thumb.png.0171dbb08d5705475803ad1309c4669e.png

resized on laptop (chrome):

img_20170526_190245-1.thumb.jpg.1e83d5418b0ff8514546ddd91daf36ab.jpg

resized on android phone:

59293ee966ec5_img_20170526_190245(1).thumb.jpg.758c6d3693c282c4cc4eec4b7b35343e.jpg

any ideas what could happen here? i thought it might be better to post here than opening a github issue - maybe others could also try and share their results?

Link to comment
Share on other sites

@Ivan Gretsky

Thanks for all the kind words!

@bernhard

I tried to duplicate the issue here on my Android phone (Nexus 6, Android 7.0, using Chrome) and do not see the effect you are seeing. In my case, the resize was identical to the one tested on desktop (OS X, Chrome). It looks like in your case, the one tested from your phone went a lot darker. I have a feeling it's got something to do with color, curve, gamma or level adjustments being applied by the phone (?) but curious to know what phone specifically, and what browser?

Link to comment
Share on other sites

Are the photos taken with the phone, or does it happen with any photo uploaded from the phone? One thing about client-side resize is that I think resized versions are more like plain jpegs, rather than ones that include a bunch of exif meta data that may appear in the original. Perhaps the visible difference in the photos is due to something in the meta data (like color profile) rather than the pixels. On the other hand, maybe it's some difference between Android 6 and 7. 

Link to comment
Share on other sites

23 hours ago, szabesz said:

Maybe a color management / color profile issue?

http://www.color-management-guide.com/web-browser-color-management.html

I think it is still best to stick to sRGB. I do not think that with mainstream monitors we will ever be able to expect that people out there will see the "same" colors as we do on our own screen.

This is very likely the reason! I've gone through this types of errors a lot! Images with AdobeRGB or sth alike.

  • Like 2
Link to comment
Share on other sites

Somehow it’s not working for me…

I see a thumbnail of the image with a grey overlay and a spinner, but it’s not uploading.
Tested with Safari, Chrome and Firefox without success. I also tested different settings for the image field, cleared cache and cookies…
The upload process works for images that are smaller than specified.
Attached you see a screenshot of the field settings, do I miss something?

 

5938058905294_Bildschirmfoto2017-06-07um15_49_06.thumb.png.65d60924b905e7582951c3e531df8528.png

Link to comment
Share on other sites

hi falk,

the settings should be fine - actually you would not have to change anything after updating an old installation. do you have any other modules installed? try with a clean installation first. for example i had a problem with uploads recently because of a 3rd party module...

good luck :)

Link to comment
Share on other sites

Don't know if other problems referred to above are related, but I'm having trouble in Chrome on OS X Yosemite, where, after uploading (and client-side resizing) a good number of images, there seems to be a memory leak or maybe Chrome not releasing memory or something.

Sequence/symptoms are -

  • Everything works fine for a number of uploads.
  • Next handful of images seem to work - thumbnail is shown under spinner - but image saved is all black.
  • Mac display starts corrupting and needs a restart to fix.
  • Same image that didn't work above now works fine.

This has happened a few times, so does seem repeatable.

I'll do some more testing and try other browsers (haven't done yet), and if anything pops up I'll report back.

  • Like 2
Link to comment
Share on other sites

I just tested Client-side resizing on a fresh pw installation without success.

Again I see a greyed thumbnail with a spinner, but nothing happens.

I tested with firefox 52.0.2 and safari 9.1.3

Any ideas?

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...