Skip Navigation

[Resolved] Custom size images no longer showing at custom size

This support ticket is created 3 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by lauraH-2 3 years, 5 months ago.

Author
Posts
#1832319

I had created a gallery type display of images in a Content Template, using the custom image size. My template code looks like this:
[wpv-for-each field="wpcf-photos"]<a href="[types field='photos' size='large' resize='proportional' separator=', ' url='true'][/types]">[types field='photos' title='%%TITLE%%' alt='%%ALT%%' align='none' size='custom' width='225' height='225' resize='crop' separator=', '][/types]</a>[/wpv-for-each]

Link to a page where the issue can be seen: hidden link
However, I just came back to the page and notice the images at the bottom of the page are displaying in full size, rather than being cropped to 225px x 225px like the toolset code says.

When you inspect the images, I see this code:
<a href="hidden link"><img decoding="async" loading="lazy" width="194259610:225" height="194259610:225" src="hidden link" title="flint3" class="attachment-custom" /></a><a href="hidden link"><img decoding="async" loading="lazy" width="285112370:225" height="285112370:225" src="hidden link" title="flint4" class="attachment-custom" /></a><a href="hidden link"><img decoding="async" loading="lazy" width="74893092:225" height="74893092:225" src="hidden link" class="attachment-custom" /></a><a href="hidden link"><img decoding="async" loading="lazy" width="58648724:225" height="58648724:225" src="hidden link" title="flint2" class="attachment-custom" /></a>

Instead of saying the width="225" it has those extra numbers with it. Any idea what is happening?

#1832951

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

I suspect the problem arises from some image optimisation/lazy loading solution you have on your site, coming from a plugin or the theme itself.

Can you try disabling and such plugin and temporarily switching theme to see if you can identify the cause.

Once you have, check its settings to see what options are available that would affect this.

Then share what you find here and we can take a closer look.

#1833207

The update of Themify Ultra must have added some image lazy loading which threw off the custom image sizes, as you suspected. I was able to disable that feature and the correct image sizes returned. It's a shame because the lazy loading helps the page load faster, but at least the formatting is back now. Thanks for your help!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.