Upload Image – Dimensions problem in Front End
-
Hello,
I’m using the ‘Upload Image’ option to display an image in a page in my Front End. Here is the code:
<?php $titan = TitanFramework::getInstance( 'cegesa' ); $imageID = $titan->getOption( 'my_upload_image' ); $imageSrc = $imageID; if ( is_numeric( $imageID ) ) { $imageAttachment = wp_get_attachment_image_src( $imageID ); $imageSrc = $imageAttachment[0]; } ?> <img src='<?php echo esc_url( $imageSrc ); ?>' />
It works fine but there is just a problem. It automatically displays the image cropped to the thumbnail size 150×150 and not the original size of the image (which is 400×300).
I find the way to disable the thumbnail size in Settings -> Medias -> set to 0 and 0 px. But doing that, it also disable the thumbnail size 150×150 in the Admin panel and I don’t want that.
There is a way to display the original size by default and not the thumbnail one?
Thank you!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Upload Image – Dimensions problem in Front End’ is closed to new replies.