• <img class=”alignnone size-full >
    I want to add custom divs and classes to this, i cannot find in wp-includes in media.php file, where is it located ? Please help.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Never, ever, edit WordPress core scripts. Editing core scripts can bring down your entire site and/or open security holes for hackers to use. what is it that you are trying to achieve?

    Thread Starter Ajay

    (@wappdev)

    Sorry for late reply.

    I am trying to get the img tag something like this

    <div class="new-class">
       <a href="url">
         <img class="alignnone size-full wp-image-61319 image-border" alt="3" src="image.jpg" width="1564" height="1144" title="" />
      </a>
    </div>

    How can achieve this without editing source code as you say ?

    Why do you need to add the class image-border to the inserted image markup?

    Thread Starter Ajay

    (@wappdev)

    Yes, i want because i want to wrap the images in a border so that they are visible well and looks appealing.

    Are you inserting the images via WordPress or hand coding them into a template file?

    Thread Starter Ajay

    (@wappdev)

    I run a tutorial site and i have to show images of the steps , i upload them using media upload and then insert in into posts. So when i upload image, automatically they should be wrapped in that div class, thats what i trying to achieve.

    cross check:
    1. You have uploaded image with proper resolution ration.
    2. img{width:100%; display:block;}

    You may use overflow:hidden; css property to achieve result you desire.

    share tutorial link if you are still confused.

    Thread Starter Ajay

    (@wappdev)

    This is my site: https://pypix.com

    You can see that image size is 100% but the width of the image is correct, i just want to wrap the image in divs. see any article for example and you can see that images are wrapped in spans but i want to wrap them in divs.

    I don’t see any image on that link, what I can see in only background images used as thumbnail wrapped using span.

    before going further go to Dashboard >> Settings >> Media

    also make sure to choose appropriate size of image while uploading it.

    another solution is adding css code to your theme style.css file
    something like .size-full{width:desiredwidth px;} but it is good practice as it will effect all elements to which this(size-full) class is assigned.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Where is this file located’ is closed to new replies.