WordPress.org

Forums

Custom Background Extended
Plugin + retina.js (or other retina method?) (2 posts)

  1. chrisrooke
    Member
    Posted 1 year ago #

    Hi!

    First, thanks Justin for this plugin - it's perfect for what I'm looking for!

    Just one question - I'm using retina.js to serve retina images to HiDPI devices, so I have two of each image - standard.png and standard@2x.png. Everything seems to be captured by it, but I had to add some code to get the CSS ones to work:

    @media only screen and (-Webkit-min-device-pixel-ratio: 1.5),
    only screen and (-moz-min-device-pixel-ratio: 1.5),
    only screen and (-o-min-device-pixel-ratio: 3/2),
    only screen and (min-device-pixel-ratio: 1.5) {
     // classes go here
    }

    Is there a way of adapting the plugin to use that code to load the same image name with the same attributes (e.g. top, vertical, etc), but just add @2x onto the end of the image name? I had a look, but I'm not very familiar with plugins and couldn't work it out.

    EDIT: Also, just realised the width and height would need to be half the retina image size (and thus the same as the original image size)...

    Many thanks!

    https://wordpress.org/plugins/custom-background-extended/

  2. baileys
    Member
    Posted 4 months ago #

    Is there a solution for this problem??

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic