Image resolution after import/export

Hey everybody,

I have this issue with images: when I export and import document resolution of image get "reseted" to origin resolution. It's a bit unexpected because I haven't made any changes to image object and I don't want to change it's resolution. Is there something I can do about it ?

How it looks in Prismic, when I open history:


{
    "backgroundImage":{
    "origin":{
       "id":"********************",
       "url":"https://prismic-io.s3.amazonaws.com/*********/*****************.jpg",
       "width":3840,
       "height":1410
    },
    "width":1920,
    "height":780,
    "url":"https://images.prismic.io//*********/*****************.jpg?auto=compress,format&rect=184,0,3471,1410&w=1920&h=780",
    "edit":{
       "background":"#fff",
       "zoom":0.5531914893617021,
       "crop":{
          "x":-102,
          "y":0
       }
    },
    "credits":null,
    "alt":null,
    "provider":"imgix",
    "thumbnails":{
       
    }
 }
}
5 Likes

I found out that this is limitation of import/export. But I also can't edit resolution for most of the images, because I have set the dimensions in my slice model. I found only one way to fix it - going through every image and re-adding the same image :pensive:

image
image

Any tips on this ?

Hi Modestas,

Welcome to the Prismic community,

As you have noticed, this is a known limitation in the Import/Export feature as mentioned in the documentation

  • You will lose image positioning and crop in the Import job. You need to re-apply these.

Unfortunately, there is currently no workaround for this except editing images one by one, but why do you say you need to reimport the images again? Can't you select the existing image and set the dimensions in the slice model? have you tried to unpublish and publish the imported document to see if the dimensions in the model will apply? Otherwise, I think it is an issue to create or document on our side.

Looking forward to your reply,
Fares

I don't need to re-import images to prismic (media), but I need to re-add (select) the same image to my document. In this way default dimensions of image are set automatically.
What I mean with default dimensions (it's from slicemachine):
image

So, yeah if I don't re-select the image I can't resize it (since it's restricted by slice model).

1 Like

Hi,

Unfortunately, currently, there is no way to avoid reimporting the images in this case.

And certainly, this can be time consuming, and for that, I will create an issue in our tracker and will send it to our dev team

1 Like

Hello, @Fares,

Maybe do you have any updates on this issue ?

Hi @modestas.rimkus,

Unfortunately, there are still no updates for this issue. We'll update this same thread when we have news about it.

Thanks

Hello,

Is there any updates here ?

If the images lose their positioning and crop while their structures are not impacted it makes this feature useless... I could understand when an evolution concern their sizes but for other manipulations its quite very frustrating...

In my opinion, the objective of this feature is to save time but it's quite annoying when we want to change our structures which concern more than a hundred contents...

Could you please consider doing something about it ?

Thank you
Maxime

2 Likes

This issue is blocking us from refactoring our Prismic schema, as it doesn't make sense to bulk update the structure and still go through all the pages and re-adjust images.

Any plans to fix this? Thanks!