Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. Connect and find Help
  3. How do i make Images inserted via Shortcode responsive?

How do i make Images inserted via Shortcode responsive?

Scheduled Pinned Locked Moved Connect and find Help
5 Posts 2 Posters 1.6k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A
    A
    alexandre
    wrote on last edited by alexandre
    #1

    Here's some context:

    • I'm running Lay Theme version: 7.0.9 and Wordpress 6.5.2
    • I'm using the Plugin Advanced Ads to insert image ads via shortcode.
    • Image dimensions can be set inside Advanced Ads but only in pixels, this means they are not responsive and stay the same dimensions when resizing the browser window
    • I can set the container class and id of each image via the plugin

    Is there a way to insert images via shortcode and make them responsive, no matter the actual image dimensions? It used to work a couple of updates ago.

    Bildschirmfoto 2024-04-20 um 19.30.35.jpg

    If I insert the shortcode into the gridder (like above), I want the image to have the same width as set in the gridder, and for it to be responsive (like below). Is that possible?

    Bildschirmfoto 2024-04-20 um 19.40.34.jpg

    Unfortunately it looks like this when I enter the shortcode (see below). No matter the size I set in the gridder, the image is shown in its original dimensions and stays unresponsive.

    Bildschirmfoto 2024-04-20 um 19.39.44.jpg

    I have only minimal knowledge about HTML/CSS or class / id, and such. Any help is much appreciated!

    1 Reply Last reply
    0
    • arminunruhA
      arminunruhA
      arminunruh
      Global Moderator
      wrote on last edited by
      #2

      i need the link

      1 Reply Last reply
      0
      • arminunruhA
        arminunruhA
        arminunruh
        Global Moderator
        wrote on last edited by arminunruh
        #3

        its just an image?

        .type-shortcode img{
        width: 100%important;
        }
        

        maybe this?

        1 Reply Last reply
        0
        • A
          A
          alexandre
          wrote on last edited by alexandre
          #4

          Well, it seemed very complicated on the surface 😅

          Thanks so much! It works fine and is exactly what I was looking for.

          1 Reply Last reply
          0
          • arminunruhA
            arminunruhA
            arminunruh
            Global Moderator
            wrote on last edited by
            #5

            nice!

            i had to change this before because some people had the exact opposite problem.
            ^^

            1 Reply Last reply
            0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            Online Users
            R
            robertobarbes
            Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
            laytheme.com
            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Recent
            • Tags
            • Popular
            • Users
            • Search