here is my setup:

-An image field attached to a content type with public storage
-A crop type "My Crop" with "175:225", no more option
-An image style "Crop thumbnail": scale width at 250px
-An image style "Crop Preview": scale at 600pxx300px
-An Image style "My Cropped Img": Use "My Crop" + scale at 175px x 225px

I use IWC for my image field with the following settings:
Always expand crop area: Yes
Show default crop area: Yes
Style d'image de l'aperçu : Crop thumbnail
Preview crop zone image style: Crop Preview
Crop Type used: My Crop

I use the "My Cropped Img" to display my image
=>Conclusion: Everything is perfect, the image is properly cropped, the process is smooth (except the incompatibility with the file field path module)

Now, If I change the storage of my image field from public to private, something very strange happends:
Firstly, I complete the process as usual (select file > crop it > save the node) then I get the expected result BUT if I refresh the page, my cropped image is reverted to my original full image.

In other words, I can see my cropped image only once... after that, my original image is showing up until the end of the times.

Comments

DuneBL created an issue. See original summary.

woprrr’s picture

Hii dunebl,
Thank a lot for this feedback !! It's an important point ! I see this fastly !!

woprrr’s picture

Hii dunebl,
Thank a lot for this feedback !! It's an important point ! I see this fastly !!

woprrr’s picture

Congratulations @DuneBL you put your finger on a problem link or picture rather imageEffect in general. Indeed during my tests, I clearly realized that the part generated by IWC is correct ( the uri, positions the crop box, storage etc ...) are ok too. So I go for a simple test with the widget "image" basis using a simple resize my image and surprise the same problems !

In the first place I have my image with the effect applied ( and uri is the right to private file system) but if I reload the page, the original filing reappears permanently ( always with good uri pointing to the private file system ).

Other border effect in that test, when i use private file when i try to edit my content with crop applied, i have an error in cropper libraries only in that case.

I suggest to identifiate the reason of problem and create fastly an issue in image core projet !!!

woprrr’s picture

Status: Active » Closed (duplicate)

After tests i can confirm #2702227: Image styles for private files are serving the original instead of derivative patches fix this problems. All is fixed in last commits in branchs 8.1.x 8.2.x 8.3.x, If you need to add an specific patche compatible to your current version you can download patch ==> https://www.drupal.org/node/2702227#comment-11529269

BUT !!! Another problem seems appear only in Private context during edition of contents (to edit crop zone). An Js error stop the correct initialisation of crop object. We need to add an other issue to solved it !