How can I resize description images in bulk?

Hello,

All of my products have images in the description. The images tend to be horizontal. This is fine on desktop. However, on Mobile, it stretches the image to fit the narrow width and makes the images look very unprofessional. There doesn’t seem to be any app on Shopify that resizes the DESCRIPTION pictures. I have looked at plenty that resize the product images, but this is different.

Any help with this besides manually changing every single one?

Try changing your image code to:


Or you can add custom styles for your element by class:

.your_class {
max-width: 100%;
height: auto;
}
1 Like

Where do I change the image code to that? I tried putting it as custom css in my theme but nothing changed. I am using the Empire theme. And what would be the class in this instance?

Does that make sense?

Please send a link to your store. If it is closed, don’t forget to send the viewing password

1 Like

Hello, Just sent you a private message, let me know if you didn’t get it.

.station-tabs-tabpanel img {
    float: none;
}

@media (max-width: 768px) {
    .station-tabs-tabpanel img {
        width: 100%;
        height: auto;
        object-fit: contain;
        float: none;
    }
}

You can add this code in a custom CSS section.

1 Like

Worked perfectly for Empire theme. Thank you!

Hey! i’ve the same problem that Cheinz had, in which part i have to paste that css code? i tried adding a new Asset in the code section but it doesn’t work

Also tried to add it to a custom class in the theme section, by clicking customize theme and going into the config button, but nothing happen