Image stretching after upgrade to latest ghost

all installation went smooth.
Node version 12

@StartupTalkyOfficial the latest version added width and height attributes to support the srcset and sizes attributes but unfortunately they can cause problems with some themes.

You can change the styles in your theme (either directly, or via a style override using the code injection feature) to apply height: auto to your images which will fix the problem.

The width/height attributes will no longer be added in the next version of Ghost because of this - it was an unintended breaking change.


Thanks kevin.

Hi @Kevin

I’m facing this issue too but sadly with an “official” ghost blog theme :pensive: :
Do you plan to update this one ?

Thank you in advance,

The fixes are in Ghost master, you will need to wait for the next release and then upgrade.

1 Like

Understood, thank you @Hannah !
Pending the upgrade, I fixed it by using code injection :


.kg-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;