Hi,
when I save a node that contain a cropped image, the message says me that the cropped image has been created but phisically inside the server folder that crop system creates in default/file/style, the imge doesnt'exit! :O
Can you help me?
Thanks!

Comments

euskarez created an issue. See original summary.

hirani89’s picture

I am having the same issue for some images as well. specially the big ones.

hirani89’s picture

I am having an issue where when creating a node and creating a cropped image, the cropped is not created. But when I go and edit the node, the cropped image gets created.

hirani89’s picture

Ok. So I have done some more debugging. What I realised is that the function loadImageStyleByCrop() is called before an entry is made in the crop_field_data table. When the findCrop function is run to get the file uri from the db, it does not exist in the db yet.

hirani89’s picture

Ok. So the Issue is that this module is not designed for decoupled/headless drupal. Like I mentioned in the comment above, the cropped image does not get created when a node is created. It gets created when it is accessed by a drupal theme or the node is edited.

So the workaround I came up with was to redirect to edit page after creating a node.

Hope this helps anyone having this issue.

woprrr’s picture

Category: Bug report » Support request
Priority: Critical » Normal
Status: Active » Closed (works as designed)

Hi @hirani89,

All mentioned here isn't a iwc work but Crop API. I'm the maintainer too and ATM the management of ImageStyle for Headless are poor IMHO you will use lot of custom works to be OK. IWC is a full UX module that allow ability to use Crop API.

For initial problem please check your server permissions it's not a IWC concern.

hirani89’s picture

Hi @Woprrr

Is there a work around for this in terms of headless Drupal? May be there is a hook I can add which can call the Crop API when a node is created. That way, I don't have to redirect users to the edit page.

hirani89’s picture

astringer’s picture

Image Style Warmer worked great for me. (I am not headless, but have an inline style for a background image, and the image was not generating).

Thank you.