• Hello,

    I usw a Tube Theme called DeTube and when I use Nelio to take the Thumbnails which I host on Image-Hoster, it looks like when it zoomed into the Picture. So the Thumbnails got cutted at the edges.

    Can someone help me, sorry for my bad english.

    regards

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author David Aguilera

    (@davilera)

    Hi!

    Yes, it does zoom into the picture; default WordPress behavior is to scale and crop regular featured images so that their dimensions match the requirements of your theme. We can’t do that (because they’re “external”), but we can simulate this behavior by using a few CSS tricks. One side-effect of this is the fact that some images might “scale up” (this never happens with regular WordPress images)… but I think it’s a price we have to accept for using external featured images.

    That said, I don’t know if you saw the notice, but we discontinued this plugin recently. You should switch to Nelio Content, another plugin of ours that also includes external featured images, but with an improved mechanism that achieves better results.

    Regards,
    David

    Thread Starter swift212

    (@swift212)

    I got this. What I have to do next to disable this “zoom”.

    regards

    Thread Starter swift212

    (@swift212)

    // ...
    /* If this is a video by jplayer, try to get thumbnail from video_posts */
    if(empty($thumb_url) && $poster = get_post_meta($post_id, 'dp_video_poster', true))
      $thumb_url = $poster;
    
    if ( function_exists( 'uses_nelioefi' ) &&
         uses_nelioefi( $post_id ) ) {
      $thumb_url = nelioefi_get_thumbnail_src( $post_id );
    }
    
    /* If still no image or is wp error, define default image */
    if(empty($thumb_url) || is_wp_error($thumb_url)) {
    //...

    I used this code for deTube but I cant see any Images now.

    I took this code from another Thread where you post that.

    • This reply was modified 7 years, 11 months ago by swift212.
    Plugin Author David Aguilera

    (@davilera)

    As I said, I’m afraid there’s little I can do for you. Keep in mind that WordPress also scales and crops regular featured images, so, in this sense, this is the “regular and expected” behavior. But, if you give it a shot, try this solution (which might result in other issues, BTW).

    The only difference between our plugin and WordPress (if we ignore the fact that our plugin uses some tweaks to simulate the same behavior) is that our plugin might scale up an image, whereas WordPress only scales them down.

    In conclusion, if the problem you’re facing is “cropping”, there’s nothing you can do and that’s coherent with WordPress behavior. If, on the other hand, the problem you’re facing is that images are zoomed in (as well as cropped), then there’s nothing you can do either; it’s how the plugin has to work to satisfy most scenarios.

    I hope this helps you understand why things are the way they are, even if they’re not solving your problem.

    Thread Starter swift212

    (@swift212)

    To be sure because my english is not very good.

    Here is the original Picture:

    Pic

    and this is how looks on my page.

    pic2

    Thank you very much for helping me.

    Would your solution help me on this problem?

    best regards

    Plugin Author David Aguilera

    (@davilera)

    Oh! Sorry, I didn’t see your snippet ?? Now I understand what you were talking about; it looks like you already tweaked your previous theme!

    With the new version, you might not need to tweak your theme at all. If you go to Nelio Content’s “Advanced” settings, there’s an option under External Featured Images named Mode; try to change it to Double-Quote Mode or Single-Quote Mode and see if things work.

    If they don’t, you simply need to change the previous snippet as follows:

    
    if ( class_exists( 'Nelio_Content_External_Featured_Image_Helper' ) ) {
      $nefi_aux = Nelio_Content_External_Featured_Image_Helper::instance();
      if ( is_string( $nefi_aux ) && strlen( $nefi_aux ) ) {
        $thumb_url = $nefi_aux->get_nelio_featured_image( $post_id );
      }//end if
    }//end if
    

    It’s slightly longer than the previous version (I might need to offer helper functions again, so that you guys can use them), but I’d rather have a solution that doesn’t need your doing anything at all!

    Thread Starter swift212

    (@swift212)

    Hey, I tried to change it to Double-Quote Mode and Single-Quote Mode but I brought nothing, but thank you for this Note.

    Can you show how my code have to be finally, than I can put it in my code unter functions.php

    regards

    Thread Starter swift212

    (@swift212)

    My code is like this at this time.

    	/* If this is a video by jplayer, try to get thumbnail from video_posts */
    	if(empty($thumb_url) && $poster = get_post_meta($post_id, 'dp_video_poster', true))
    		$thumb_url = $poster;
    
    if ( class_exists( 'Nelio_Content_External_Featured_Image_Helper' ) ) {
      $nefi_aux = Nelio_Content_External_Featured_Image_Helper::instance();
      if ( is_string( $nefi_aux ) && strlen( $nefi_aux ) ) {
        $thumb_url = $nefi_aux->get_nelio_featured_image( $post_id );
      }//end if
    }//end if
    	
    	/* If still no image or is wp error, define default image */
    	if(empty($thumb_url) || is_wp_error($thumb_url)) {
    		if($default === false || $default === 0)
    			return false;
    		
    		$thumb_url = !empty($default) ? $default : get_template_directory_uri().'/images/nothumb.png';
    	}
    		
    	if($echo)
    		echo $thumb_url;
    	else
    		return $thumb_url;
    } 

    But it doesnt work so.

    regards

    Plugin Author David Aguilera

    (@davilera)

    Hi!

    By looking at this fragment, I’d say our solution should work…

    The fragment seems to be inside a function. Is there a return statement before the if block we added? If there’s one, maybe the function is returning a value before we even get the chance to check if the current post $post_id has an external featured image (and use it if there’s one).

    Plugin Author David Aguilera

    (@davilera)

    Any updates on this? Did you fix the issue?

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Externel Image automatically Zoom?’ is closed to new replies.