• Resolved xCiiD

    (@xciid)


    Hey there!

    I recently noticed that you did something in the previous versions of the plugin:

    1.0.3
    Improved image sizing. Now, the plugin uses the sizes the theme defines and tries to scale and crop the external image for its proper display

    You can see my problem here:

    https://quirktools.com/screenfly/#u=http%3A//myreclaim.de&w=1024&h=600&a=1&s=1
    Im using the “Elite” theme by https://themesholic.com/.

    Is there any way to fix it? I would like to match every device listed at the Screenfly website. Due to the amount i wouldnt know how to do it with @media Queries. There are way to nearly exactly resolutions.

    Is there any way to get the problem solved?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Nelio Software

    (@nelio)

    Hi xCiiD. I’m afraid I don’t understand what your issue is. As you may already know, our plugin modifies the results of a function called (get_)the_post_thumbnail. This function has one argument that may include the specific size of the featured image to insert, and we’re simply using that.

    If you could please further elaborate what your problem is, I might be able to help. Thanks!

    Thread Starter xCiiD

    (@xciid)

    Hey Nelio!

    Here is a screenshot: https://i.imgur.com/EQL1sDr.jpg.

    As you can see, the first picture is a external picture embedded by your plugin. The 3 other pictures are out of the library. Its just the “resizing” that isnt working properly for this theme / me.

    Plugin Author Nelio Software

    (@nelio)

    I see. Your theme is inserting images with the following size: width="585" height="456" (you can see it by inspecting the HTML code of regular featured images). Then, this images are scaled using a CSS rule:

    .md-team .md-member .member-image img {
      /* ... */
      width:100%;
      height:auto;
      /* ... */
    }

    As you can see, the width is forced to be of the container’s size, whereas the height is set to maintain the proper aspect ratio (auto).

    Our plugin uses the original width and height (585×456) your theme uses. These values are defined as CSS inline attributes of the img.nelioefi tag.

    I’m afraid that the only solution here is that you manually define appropriate width and height values for the images, depending on where they appear (in this particular case, inside a div.owl-carousel tag) and the different @media queries your theme uses.

    Thus, for instance:

    @media(min-width:992px) {
      .md-carousel.owl-carousel.owl-theme img.nelioefi {
        width: 205px !important;
        height: 160px !important;
      }
    }

    Unfortunately, using external featured images does not always come for free… you may have to spend some time tweaking your theme!

    Viel Glück!

    Plugin Author Nelio Software

    (@nelio)

    Hi! It’s been a week since my last post. I’ll mark the issue as solved, as the only possible solution to it is (as I said) the creation of specific CSS rules.

    Good day

    Thank you for this plugin.

    I have one problem. When I set my image URL it displays but it doesn’t use the custom size that my theme uses, so the images and thumbnails are different heights. Is there any way of using the theme sizes? fixing the height to the same height as the theme’s image height?

    Hope that makes sense?

    Thanks
    Juan

    Plugin Author Nelio Software

    (@nelio)

    Hi, Juan! Actually, our plugin does use the width and height your theme defined. This is how our plugin works:

    • We hook into a function called (get_)the_post_thumbnail.
    • One of the parameters of this function (which may or may not be initialized) is $size.
    • This size is, as you can imagine, defined by your theme. If the $size parameter is set, we use it to set the width and height of the featured image (using inline CSS properties).
    • If $size is not set, then we rely on your theme’s CSS files, which, again, may define the width and height of your featured images.

    Unfortunately, the previous workflow does not guarantee that you’ll get proper results. That’s why you may need to add custom CSS rules for tweaking the featured images. In those cases, the img tag has a new class (nelioefi) that will ease the definition of specific rules for external featured images: img.nelioefi.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Images are not matching the resolutions of the theme.’ is closed to new replies.