Image_url doesn't crop translated images

We use multiple markets. Some product images have text on it. We translated it. It theme we use crop: {{ image | image_url: width: 600, height: 900, crop: ‘center’ }}

if not translated works fine.

Tried:

  • Image size correct.
  • tried different type images, PNG, JPG. No help
  • even tried just grab as string and append crop url: “?crop=center&height=900&v=1771846621&width=600”

it looks like translated images are stored not as an image object but as a string, and losing the cropping functionality.

Just resize ALL product images is not solution.

What options do I have? @Shopify

1 Like

Hey @Darius_SLU,

To help me replicate this, can you share a bit more context on how you have this configured within your markets and theme:

  • How is the image variable being assigned in your template? The line you shared shows how it’s being used, but seeing the code that sets it (a loop, an assignment, a section setting) would help a lot.
  • How are the per-market images configured on the product side? For example, are they set up through the Markets admin, metafields, or somewhere else?

Once I can see how the image is being pulled in, I’ll have a much better idea of what’s happening with the crop.

Hi, @KyleG-Shopify,

Thank you for your reply. I will try to add more context. If still need more info, let me know.

We use app to translate images where we have text: Product Image Translate Easy - Show translated product images to customers in their language | Shopify App Store

All our images are square. In collection and product page we use cropped images. everything is fine with not translated images. But translated images looks like are storaged somewhere else in shopify and Liquid image crop function doesn’t work for this products images. It looks like returns string instead image object. You can check example here: Tour de cou pour homme en laine mérinos vert foncé ❤️ menique - MENIQUE

App developer solve an issue