Home Forums Front-end Issues Custom image size


Custom image size

  • i create a repeater filed with image filed and now i want to show front end custom size image.

    Ex. all my image will be height 50px and width will be automatically resize base on hegith 50px. i was looking for that solution long time but i don’t get it yet. would any one please me out how to do

     <?php if( have_rows('feature_on') ): ?>
                <?php while( have_rows('feature_on') ): the_row(); ?>
                    <a target="_blank" href="<?php the_sub_field('feat_url'); ?>" tabindex="0">
                        <img src="<?php the_sub_field('feat_logo'); ?>" alt="<?php the_sub_field('feat_name'); ?>"></a>
                <?php endwhile; ?>
                <?php endif; ?>
  • Hi pagol, there’s a few examples relating to what you’re talking about on the documentation page, just need to make sure you declare a custom image size in your functions.php. If you’ve not done that already have a look here -

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Custom image size’ is closed to new replies.