Skip Navigation

[Closed] Serving the proper size of an image

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 11 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

This topic contains 1 reply, has 1 voice.

Last updated by Shark 11 years, 6 months ago.

Author
Posts
#20015

Hi, I am trying to render an image which is a custom field "listing_image" defined in Types:

<?php echo(types_render_field("listing_image", array("alt"=>"Property Image", "size"=>"medium"))); ?>

In this case the images are uploaded via WP and I have verified that multiple versions of the image have been created. The medium size should be limited to 300x300 pixels, so for example I have

image.jpg

and

image-300x200.jpg

in the uploads folder. I am able to see the image rendered in a size of 300x200. However, when I looked carefully at the HTML code, it is actually rendering the full size image scaled to the medium size area, i.e.

image.jpg

was served rather than

image-300x200.jpg

as expected.

Is this the current behaviour, or am I doing something wrong?

#20019

It turned out that when I modified the site URL, the images' URL remain unchanged. After I updated one with the correct URL the correct size is served.

The topic ‘[Closed] Serving the proper size of an image’ is closed to new replies.