WP Manifestindependent plugin directory
manifest / media / du-responsive-images

Responsive Images for Developers WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA

Responsive Images for Developers

★ 3stars
4kcomposer installs
0.0.15latest · 9 years ago

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/digitalunited/du-responsive-images/archive/refs/heads/master.zip

On Packagist as digitalunited/du-responsive-images:

composer require digitalunited/du-responsive-images
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Why?!?

TODO

How?!?

TODO

Libs

Useage

\DigitalUnited\ResponsiveImage::render([
    'imgId' => $imgId,
    'output' => 'img'
    'ratio' => '4x3',
    'imgAttributes' => [
        'class' => [],
        'alt' =>  $alt,
    ],
    'wrapperAttributes' => [
        'class' => [],
    ],
    'divWithBgImageAttributes' => [
        'class' => ['cover']
    ]
]);

Options

imgId

A WordPress attachment image id.

Output (All is not implemented yet)

  • img: Regular img-tag (Not implemented, yet)
  • img: Regular img wrapped in a div with kept aspect-ratio. The img behaves normal if the ratio setting is omitted.
  • div: Div with srcset
  • srcset: For usage in "data-srcset"-tag

Ratio (Optional)

The following aspect ratios are available.

  • string "1x1"
  • string "2x1"
  • string "4x1"
  • string "4x3"
  • string "16x9"
  • string "1x2"
  • string "1x4"
  • string "3x4"
  • string "9x16"

Ratio (Only valid when "output = img-ratio" or "output = img")

imgAttributes and wrapperAttributes (Only valid when "output = img")

HTML attributes added to the wrapper-div and the img-tag when using img output mode

divWithBgImageAttributes (Only valid when "output = div")

Output as div has 2 premade helper classes to avoid inline styling, "cover" and "contain".

TODO

  • Caching of rendering
  • Ratios with bootstrap breakpoints
  • Use printplugin for Lazysizes

Releases

13 releases.

Tag
Published
0.0.15 latest
May 22, 2017 9 years ago
Feb 15, 2016 10 years ago
Jan 26, 2016 10 years ago
Nov 20, 2015 10 years ago
Sep 17, 2015 11 years ago
Sep 17, 2015 11 years ago
Sep 7, 2015 11 years ago
Jun 1, 2015 11 years ago
Jun 1, 2015 11 years ago
Jun 1, 2015 11 years ago
May 7, 2015 11 years ago
Mar 23, 2015 11 years ago
Mar 16, 2015 11 years ago

These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.

A grade

Security

Responsive Images for Developers 0.0.15 · audited by WP Registry

No security issues found.

Audited release
0.0.15
Findings
none
Worst severity
—
Content hash
097f1748d898c9f60a9db805…

WP Registry hashes the installable build and reports on that exact bytes-for-bytes copy. Embargoed findings are withheld until they are disclosed, so a clean verdict means nothing public is outstanding. WP Manifest does not audit code itself.