Skip Navigation

[Closed] Image field not displaying width and height properties

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, 9 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.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 19:00 10:00 – 19:00 10:00 – 19:00 10:00 – 19:00 10:00 – 19:00 -
- - - - - - -

Supporter timezone: Europe/Madrid (GMT+01:00)

This topic contains 1 reply, has 2 voices.

Last updated by Caridad 11 years, 9 months ago.

Assisted by: Caridad.

Author
Posts
#14960

Below is the code I'm using to display an image, but it's not adding the "width" and "height" attributes. Am I doing something incorrectly?

This is where the page is located: hidden link

Thanks!

<div class="page-content">
				<?php
				$args = array( 'post_type' => 'play', 'posts_per_page' => 10, 'order' => "ASC" );
				$loop = new WP_Query( $args );
				while ( $loop->have_posts() ) : $loop->the_post();
				?>
					<div class="plays-wrapper">
						<div class="col-one">

// The below line is the code I'm having issues with.

							<?php echo(types_render_field("thumb", array('width' => '230', 'height' => '152', 'title' => types_render_field("title", array()), 'alt' => types_render_field("title", array())))); ?>
						</div>
						<div class="col-two">
							<h2><a href="<?php the_permalink(); ?>"><?php echo(types_render_field("title", array())); ?></a></h2>
							<?php if (types_render_field("author", array())) : ?>
							<p class="play-info">By <?php echo(types_render_field("author", array())); ?></p>
							<?php endif; ?>
							
							<?php if (types_render_field("director", array())) : ?>
							<p class="play-info">Directed by <?php echo(types_render_field("director", array())); ?></p>
							<?php endif; ?>
							
							<?php if (types_render_field("translator", array())) : ?>
							<p class="play-info"><?php echo(types_render_field("translator", array())); ?></p>
							<?php endif; ?>
							
							<?php if (types_render_field("date", array())) : ?>
							<p class="play-info"><?php echo(types_render_field("date", array())); ?></p>
							<?php endif; ?>
						</div>
					</div>
				<?php
				endwhile;
				?>
			</div>
#15199

Dear Adams,

Did you upload the images from a different domain than the one you are viewing them from? If so, we are working on a fix for this issue and it will be in next release.

Regards,
Caridad

The topic ‘[Closed] Image field not displaying width and height properties’ is closed to new replies.