WordPress.org

Ideas

Images id in media url retuns image src like http://domain.com/?img=101

  1. rsfs
    Member

    http://domain.com/?img=101
    returns an image src with id 101 in wordpress media gallery,

    Nice to handle the images on wordpress gallery without absolute path.

    I mean that wordpress media gallery manage the images like pages or posts, example

    http://domain.com/?page_id=101

    like so in images

    http://domain.com/?img_id=101

    returns img src

    or

    http://domain.com/?img_id=101&html=true

    returns image with html img tag

    it solves, absolute pathing

    like,

    <img src="http://domain.com/wp-content/uploads/2014/1/img.jpg" />

    by this one

    <img src"<?php bloginfo('url') ?>/?img_id=101"/>

    or

    <img src"/?img_id=101"/>

    Posted: 11 months ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.

  • Rating

    12345
    0 Votes
  • Status

    Duplicate of another idea