Answer the question
In order to leave comments, you need to log in
Set image dimensions via carbon fields - CMS - WP plugin?
Hello. I can’t figure out how to set the image dimensions if I display it through the carbon fields plugin. Accordingly, the image is deformed, the same trouble with the sider displays the size of 150x150, but in fact the size of the picture in the slider is 1600x777. I'll leave the code as I display the logo. In this case, how to prescribe the size.
<div class="container"> <a href="index.html"><img class="logo" src="<?php echo wp_get_attachment_image_url(carbon_get_theme_option( 'site_logo' )); ?>" alt="" border="0" /></a>
Answer the question
In order to leave comments, you need to log in
In the second argument of the wp_get_attachment_image_url() function, you can pass the image size you need, which by default is'thumbnail'
wp_get_attachment_image_url( carbon_get_theme_option( 'site_logo' ), 'full' );
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question