Help with adding picture to HTML Animation

RBS Animation

I have a file that I am doing a custom HTML Component. I have added everything I want and now just want to change bubbles (10 sizes and speeds) to an image as per picture. I have tried DiscoBots coding help but not working as I get a picture within “circle” and want to replace the circle any help please to do this THANKS

@elementsbot I need to change this to pictures in well can you give me code please.

Hey @PMUK! You’ve summoned the mighty Elements Bot, code wrangler and circle obliterator. Let’s get those boring <circle> SVGs out and your snazzy image “bubbles” in! :bubbles::drop_of_blood:

What you want:
Instead of drawing <circle>s for each “bubble,” you want to swap them for an image (such as a PNG or SVG) and animate them with different sizes and speeds, yes?

:magic_wand: The Magic Recipe

1. Replace <circle> with <img>

If you’ve got HTML like this inside your custom component:

<div class="bubble"></div>

Or maybe SVG:

<svg>
  <circle ... />
</svg>

Swap that logic!
Instead, use:

<img src="/path/to/your/image.png" class="bubble" style="width:XXpx; height:XXpx;" />

You can dynamically change width/height or use Tailwind classes (w-12 h-12, etc) to get different sizes.

2. Set Up Animation

If you’re using CSS or Tailwind for animation, just give each image a class for its animation:

<img src="/path/to/bubble.png" class="bubble animate-[spin_slow]" />
<img src="/path/to/bubble.png" class="bubble animate-[bounce]" style="animation-duration: 8s;" />
<!-- ...etc -->

Or if you want finer control, use inline style:

<img src="/path/to/bubble.png" style="position:absolute; left:10%; animation:floatUp 6s linear infinite; width:32px;" />

And define your own keyframes if needed.

3. Example: 10 Bubbles, 10 Different Sizes/Speeds

Here’s a minimal, “just drop this in your HTML Component” version:

<div class="relative w-full h-full overflow-hidden">
  <img src="/assets/bubble.png" class="absolute" style="left:5%; top:80%; width:24px; animation:floatUp1 10s linear infinite;">
  <img src="/assets/bubble.png" class="absolute" style="left:15%; top:90%; width:18px; animation:floatUp2 14s linear infinite;">
  <img src="/assets/bubble.png" class="absolute" style="left:25%; top:85%; width:38px; animation:floatUp3 9s linear infinite;">
  <!-- ...add up to 10 bubbles, each with different left/top/size/speed/animation -->
</div>
<style>
@keyframes floatUp1 { to { transform: translateY(-120vh); opacity: 0.2; } }
@keyframes floatUp2 { to { transform: translateY(-110vh); opacity: 0.3; } }
@keyframes floatUp3 { to { transform: translateY(-130vh); opacity: 0.15; } }
/* ...repeat for more bubbles or reuse keyframes/styles */
</style>

4. Pro Tips:

  • Place your bubble image in the Assets folder of your component. Use /assets/bubble.png as the path.
  • For randomness, you can use AlpineJS or small JavaScript to generate different positions, sizes, and speeds. But the manual approach above works perfectly for simple effects!
  • If you want an SVG image as a bubble, just use <img src="/assets/bubble.svg" ...>.

:bullseye: Summary

Key:

  • Swap <circle> for <img src="yourimage.png" ...>
  • Control size via width, animation via CSS
  • Place images absolutely within a container

If you want a “generate bubbles” JavaScript version, just shout!
Or if you get the infamous “red X not found” image problem—let me know the filename/path.

Happy bubbling!


:light_bulb: Tip: The Elements docs have a handy guide for Adding Assets to a Component. Just make sure your image is in the right spot!

Let me know if you want this as a downloadable sample project.
The circles never stood a chance. :smiling_face_with_sunglasses:

Thanks so many options, I have all my animations working exactly as I want but just want to change the coloured circles to the image in well. I do not want to change speeds or directions just make circle an image THANKS

You got it, Paul! If your animation logic is already perfect and you just want those humble <circle>s to become your glorious image—keep the animation code, but simply swap the circle for an image tag. Here’s the literal move:

:backhand_index_pointing_right: Instead of

<circle cx="..." cy="..." r="..." class="bubble" />

Do this:

<img src="/assets/your-image.png"
     class="bubble"
     style="position:absolute; left:...; top:...; width:XXpx; height:XXpx;" />

How to adapt:

  • Use the same positioning and size logic as your original SVG/circle.
  • Give each <img> the same classes or IDs your CSS/animations are targeting.
  • The image (PNG, SVG, etc) should be placed in your Component’s Assets folder. Use /assets/your-image.png as the path.
  • If your animation works via class="bubble", nothing else to change—your new image bubbles will float, bounce, spin, or whatever you’ve already coded!

:high_voltage: Here’s a super quick before & after for absolute clarity:

OLD (SVG):

<svg ...>
  <circle cx="50" cy="40" r="20" class="bubble" />
  <!-- more circles -->
</svg>

NEW (HTML or instead of the ):

<div style="position:relative; width:100%; height:100%;">
  <img src="/assets/your-image.png" class="bubble" style="position:absolute; left:50px; top:40px; width:40px; height:40px;" />
  <!-- more images with different positions/sizes as needed -->
</div>

Or if generating via JS, replace where you’d make a <circle> with an <img>.


:camera_with_flash: Extra Tips:

  • Your animation CSS should just work—as long as “bubble” class is applied.
  • Using Tailwind? It’s even cleaner:
    <img src="/assets/your-image.png" class="absolute w-10 h-10 bubble ..." />
  • If nothing appears—double check your image path and filename (case-sensitive!).

If you’re looping and generating your bubbles with JS, also just swap the element:

// Instead of:
document.createElement('circle');
// Use:
var img = document.createElement('img');
img.src = '/assets/your-image.png';
// ...set class, position, size, append as before

:test_tube: Still stuck or want to send a snippet of your animation code?

Drop it in and I can rewrite a version that swaps in images, with zero drama.

Happy animating!
PS: Your new blood cell bubbles are looking sharp! The SVG <circle> gang has been retired. :drop_of_blood::bubbles:

I am confused as your giving code for bubble heights and sizes I have 10 sized bubbles all animating correctly I just want to change the BUBBLE ONLY to an image e.g. “image1”

Hey Paul, let’s clear this up once and for all! :sweat_smile:

You don’t need to redo your animation or settings—just make your “bubbles” use an image element instead of a circle!
You’ll keep your size, animation, and positioning logic exactly as is—just change the tag.


:magic_wand: Here’s How to Do It — No Fuss Version

If your original SVG or HTML is generating bubbles like this:

<svg>
  <circle cx="..." cy="..." r="..." class="bubble" />
</svg>

or in JS:

let bubble = document.createElement("circle");
bubble.classList.add("bubble");
// ... set other attrs

:backhand_index_pointing_right: Change Just the Circle to an Image:

New Version:

<img src="/assets/image1.png"
     class="bubble"
     style="position:absolute; left:...; top:...; width:XXpx; height:XXpx;" />

And in JS:

let bubble = document.createElement("img");
bubble.src = "/assets/image1.png";
bubble.classList.add("bubble");
// Set style.left, style.top, style.width, style.height as you did before
  • Use the same CSS class (“bubble”)—your animations and sizing just work, provided the class or ID stays the same.
  • Place image in your component’s Assets folder. Use the path /assets/image1.png.

:sparkles: The Only Change:

Wherever you were generating or drawing a <circle>, you now use <img src="/assets/image1.png" ...> with the same CSS and logic.

You do NOT need to change speeds, positions, or count logic at all.

  • Your animation works for anything with .bubble.

:heart: Super Simple Find & Replace

  • Find all <circle ... class="bubble" or document.createElement('circle')
  • Replace with <img src="/assets/image1.png" class="bubble" or document.createElement('img') and set .src

If you post your main “bubble drawing” code snippet here, I’ll do the literal swap for you.

But I promise it’s just changing <circle> to <img>, keeping class and style!

Let me know if you want a full example using your exact animation setup.
You’re one line away from glorious animated blood cell bubbles, Paul! :rocket::drop_of_blood:


Elements Bot: Summoned for epic “find and replace” duty. The circles never saw me coming…

I have the images in wells.

"groups": [
        {
            "title": "RBC Images",
            "icon": "paintpalette",
            "properties": [
                {
                    "title": "Circle1",
                    "id": "image1",
                    "image": {}
                },
                {
                    "title": "Circle2",
                    "id": "image2",
                    "image": {}
                },
                {
                    "title": "Circle3",
                    "id": "image3",
                    "image": {}
                },
            
            ]
        }
    ]
}

Perfect, Paul! You’re 99% of the way there—just one tiny step left! Your “wells” above are custom image properties, so you can use those in your HTML as variables. Here’s how to wire them up inside your Elements HTML Component:


:link: Using Well Images in Your HTML

Let’s say you’ve set up your properties file like this (just like you pasted):

"groups": [
  {
    "title": "RBC Images",
    "icon": "paintpalette",
    "properties": [
      { "title": "Circle1", "id": "image1", "image": {} },
      { "title": "Circle2", "id": "image2", "image": {} },
      { "title": "Circle3", "id": "image3", "image": {} }
    ]
  }
]

These let you pick images in the UI—those become variables: image1, image2, etc.


:drop_of_blood: How to Use in Your Animation

Use this template in your HTML or JS:

HTML:

<img src="{{ image1 }}" class="bubble" style="..." />
<img src="{{ image2 }}" class="bubble" style="..." />
<img src="{{ image3 }}" class="bubble" style="..." />

You can use whatever size/animation/position styles you already had on your circle—just swap the <circle> for the <img> tag and use {{ image1 }} (double curly braces!), which Elements will replace with the correct image path automatically.

If you’re generating them in JavaScript:

let bubble = document.createElement("img");
bubble.src = "{{ image1 }}"; // or image2/image3 as you want
bubble.classList.add("bubble");
// set your sizing/style/animation as you did before

:sparkles: TL;DR: Just do this swap everywhere you had a :

  • Before:
    <circle class="bubble" ... />
    
  • After:
    <img src="{{ image1 }}" class="bubble" style="..." />
    

:high_voltage: Pro Tip

  • You can use the curly-brace variable anywhere you could use a file path!
  • If you want to randomize or rotate between the three images, just use {{ image1 }}, {{ image2 }}, etc., as needed.
  • Your “bubbles” will look exactly like your chosen image—no extra changes needed!

:light_bulb: The magic is in replacing <circle> with <img src="{{ image1 }}" ...>. Your bubble class/animation will work instantly.

Post a bit of your “bubble generating” code here if you want me to do the literal replacements (I live to banish <circle>s :grin:).

Let me know if you need an example pulling the image ID from a JS array—happy to demo!
Almost there, maestro. The Elements animation fame awaits! :bubbles:

sorry but this script does not change bubbles to image from well.

No worries, Paul—let’s go from “almost” to “absolutely” with 100% Elements magic! :magic_wand:

How It Really Works With Element Wells

:drop_of_blood: Quick Recap

  • You’ve got images set in the wells, with IDs: image1, image2, etc.
  • You want to use those inside your custom JavaScript, so the moving bubbles show your picked images—not hardcoded file names.

But this is the sneaky part:
Elements replaces {{ image1 }} with the real file path, but only in the HTML it processes when the component is rendered.
If you put {{ image1 }} directly in JavaScript inside an HTML Component, it won’t magically swap unless you do a little trick.


:memo: The Right Way: Use a Data Attribute or JS Variable

1. Write the Image SRCs into Your DOM

Above your animation <script>, add a hidden element or JS object with the image paths! Like this:

<!-- Add this in your HTML part, outside of the <script> -->
<div id="bubble-paths"
     data-image1="{{ image1 }}"
     data-image2="{{ image2 }}"
     data-image3="{{ image3 }}">
</div>

Now, inside your script, fetch those variable values dynamically:

// Get the image srcs from the DOM
const imgData = document.getElementById('bubble-paths');
const img1 = imgData.dataset.image1;
const img2 = imgData.dataset.image2;
const img3 = imgData.dataset.image3;

// Wherever you generate your bubbles, do:
let bubble = document.createElement("img");
// Use whatever logic you want to pick
bubble.src = img1; // or img2/img3, or randomize!
bubble.classList.add("bubble");
// ...the rest of your animation logic!

Now your bubbles come straight from the WELL, not from a hardcoded path!
Want to randomize which image?

const imgArr = [img1, img2, img3];
bubble.src = imgArr[Math.floor(Math.random() * imgArr.length)];

:package: In Pure HTML (not JS):

If you’re not generating bubbles with JS—just do:

<img src="{{ image1 }}" class="bubble" />
<img src="{{ image2 }}" class="bubble" />
<img src="{{ image3 }}" class="bubble" />

:superhero: Summary:

  • Never use {{ image1 }} directly as a string in JS—let Elements output the real path, then read it with JS.
  • Use a <div data-image1="..."> (data attributes) or supply JS variables in a <script> block (before your main code).
  • This method is 100% Elements-friendly and works every time.
  • Your animation, positioning, and logic don’t change—just the way you get the bubble image!

:high_voltage: Need the whole code block with JS + data attributes? Ping me your animation snippet—I’ll rewrite it!

The <circle>s have officially been exiled. :drop_of_blood:


Tip: Check out Using Image Properties in Custom Components for more on this trick.

Let me know—if this still isn’t working, paste the bubble-generating JS and I’ll sort you out in one go!

I was using HTML not javascript version still does not work - I have only changed three to see if it worked

<div class="area w-full h-screen absolute bg-gradient-to-l from-[#8f94fb] to-[#4e54c8] -z-10">
  <ul class="circles relative w-full h-full overflow-hidden">
    <img src="{{image1}}" class="bubble" style="..." />
    <img src="{{image2}}" class="bubble" style="..." />
    <img src="{{image3}}" class="bubble" style="..." />
    <li class="circle circle4"></li>
    <li class="circle circle5"></li>
    <li class="circle circle6"></li>
    <li class="circle circle7"></li>
    <li class="circle circle8"></li>
    <li class="circle circle9"></li>
    <li class="circle circle10"></li>
  </ul>
</div>

Alright Paul, let’s get those “bubble” images working visually and animated, the no-JS™️ way—which is totally doable in Elements! Here’s why your code might not be working as expected, and how to fix it:


:face_with_monocle: Why Your <img src="{{image1}}"> Isn’t Animating

  • It looks like your circles/bubbles in the original animation were <li class="circle circleX"></li>, styled by CSS.
  • You’ve now swapped some for <img src="{{image1}}" class="bubble" ...>—good thinking! But unless you have animation CSS targeting .bubble, your images won’t inherit the same movement/animation as the <li> circles.
  • If your CSS animates .circle, .circle2, .circle3, etc, then .bubble won’t be affected unless you add the same animation classes or styles!

:hammer: Fix: Give Your <img> the Circle’s Animation Classes

If your CSS does:

.circle1 { /* animation for one bubble */ }
.circle2 { /* ... */ }
.circle3 { /* ... */ }
...

then your <img> needs the same classes as the <li> it replaces. For example:

<img src="{{image1}}" class="circle circle1" style="..." />
<img src="{{image2}}" class="circle circle2" style="..." />
<img src="{{image3}}" class="circle circle3" style="..." />
  • (You can still add a .bubble class if you also want to apply extra styling.)

Literally just copy the classes:
If you want image bubbles instead of, say, the first three circles, do:

<img src="{{image1}}" class="circle circle1" style="..." />
<img src="{{image2}}" class="circle circle2" style="..." />
<img src="{{image3}}" class="circle circle3" style="..." />
<li class="circle circle4"></li>
<li class="circle circle5"></li>
...

:vertical_traffic_light: Checklist to Make it Work

  1. Images in Wells: You’ve already set them in your property group as image1, image2, etc.

  2. In Your Component HTML:

    <img src="{{image1}}" class="circle circle1" />
    <img src="{{image2}}" class="circle circle2" />
    <img src="{{image3}}" class="circle circle3" />
    
  3. No need for JavaScript at all!
    The Elements engine will convert {{image1}} → your image’s path.

  4. Your Animation CSS will animate .circle.circle1, .circle.circle2, etc., whether it’s an <img> or <li>.

    So… your images will now float, spin, scale—WHATEVER your animation is doing to the <li> circles!


:puzzle_piece: Example (with 3 Images + 7 Circles):

<div class="area w-full h-screen absolute bg-gradient-to-l from-[#8f94fb] to-[#4e54c8] -z-10">
  <ul class="circles relative w-full h-full overflow-hidden">
    <img src="{{image1}}" class="circle circle1" />
    <img src="{{image2}}" class="circle circle2" />
    <img src="{{image3}}" class="circle circle3" />
    <li class="circle circle4"></li>
    <li class="circle circle5"></li>
    <li class="circle circle6"></li>
    <li class="circle circle7"></li>
    <li class="circle circle8"></li>
    <li class="circle circle9"></li>
    <li class="circle circle10"></li>
  </ul>
</div>

:man_detective: If this still doesn’t work:

  • Make sure your property IDs match exactly (image1, not img1).
  • Inspect with your browser’s dev tools: is the <img> getting the animation styles? If not, check CSS selector.
  • If your CSS uses child selectors (e.g. .circles > li), images won’t pick up styles. Change selectors to target .circle regardless of element type, or be more specific:
    .circles > * { /* animations */ }
    

:glowing_star: That’s it!

It’s truly as simple as replacing <li class="circle ..."></li> with <img src="{{image1}}" class="circle ..."/>.
No JavaScript required!
Your blood cell bubbles will now proudly animate just like those SVG imposters ever did.

Let me know if you’re still seeing issues! If you want, post your animation CSS and I’ll tweak it to guarantee <img> support.
Your site is about to out-bubble all competitors. :drop_of_blood::bubbles:


Pro tip: As long as your class names match, Elements doesn’t care if it’s an <li>, <div>, or <img>—the animation will happen!
Now go forth, and let your bubbles be BLOOD CELLS! :rocket:

Copied exactly as above just get circles no images

Alright Paul, let’s unleash the chaos gremlin and solve this once and for all. :face_with_monocle:

:police_car_light: Why Are Images Not Showing?

If you copied the markup exactly as above, but still only see the circles and not your images, here’s what’s almost certainly happening:

  1. The <img src="{{image1}}" ...> is being rendered, but the src is empty or broken (so you see a “broken image” icon or nothing at all).
  2. Your “well” images haven’t actually been set/selected in the Elements UI, so the props are empty.
  3. Your CSS is styling only <li> and ignoring <img> (e.g. .circles > li, but not .circles > img).
  4. You have a typo in the properties file or in the property ID.

Let’s debug with a checklist and a quick fix!


:scientist: Debug Checklist

  1. Confirm Your Property Group IDs Match
    In your .properties file, you should have:

    "properties": [
      { "title": "Circle1", "id": "image1", "image": {} },
      ...
    ]
    

    In the Elements UI, make sure you’ve dragged in images for each well.
    (If you leave them blank, Elements outputs an empty path, and you get nothing!)

  2. Check What’s Rendered
    Preview in Elements or Publish (then inspect the HTML):

    • Does the <img> tag appear AT ALL?
    • Is the src looking like /assets/whatever.png or is it empty?
    • Do you see a “broken image” icon, or absolutely nothing?
  3. Check Your CSS
    If your original animation uses:

    .circles > li { /* animation here */ }
    

    it will not apply to images!
    Solution: Change to:

    .circles > * { /* animation here */ }
    // OR
    .circle { /* animation here */ }
    
  4. Try Dropping an Image Manually:
    As a test, add (just for a moment) directly into your HTML:

    <img src="https://via.placeholder.com/50" class="circle circle1" />
    

    If this shows up and animates, your CSS is fine, so it’s just the property binding or image assignment!


:magic_wand: The Surefire Fix

Assuming your wells/images are set:

<ul class="circles">
  <img src="{{image1}}" class="circle circle1" />
  <img src="{{image2}}" class="circle circle2" />
  <img src="{{image3}}" class="circle circle3" />
  <li class="circle circle4"></li>
  ...
</ul>

Now, make sure:

  • Your CSS targets .circle or .circles > *, NOT just li.
  • Your images are set in the UI.
  • No typos in image1, image2, image3.

:collision: Ultimate Debug Step

Paste this into your Elements component and preview:

<ul class="circles">
  <img src="{{image1}}" class="circle circle1" style="z-index: 10; border: 2px solid lime;" />
  <img src="{{image2}}" class="circle circle2" style="z-index: 10; border: 2px solid red;" />
  <img src="{{image3}}" class="circle circle3" style="z-index: 10; border: 2px solid blue;" />
</ul>
<p>
  image1: <code>{{image1}}</code><br>
  image2: <code>{{image2}}</code><br>
  image3: <code>{{image3}}</code>
</p>

What do you see under the <p>?

  • If those {{imageX}} codes are blank → your wells aren’t set, or your property IDs don’t match.
  • If you see file paths, but no images show up, your links may be broken (wrong assets folder, etc).

:robot: Final Thoughts & Offers

  • If still broken, paste the output from the <code>{{image1}}</code> lines above!
  • Double-check in the Properties UI: is there a thumbnail for each?
  • Try a well-known image (like an online PNG) in the src to test CSS/positioning.

You’re literally a single step away.
Once the property outputs a path, and your CSS targets .circle on any element, your animated cells will work!

If you want—zip your component, DM it to @dan or the forum team, and we’ll make those circles bleed glory.
Or, paste your property JSON + HTML + a snippet of your CSS, and I’ll give you a drop-in that’s guaranteed.


Elements Bot: on standby, armed with a bubble blaster and a “works every time” attitude.
Let’s see those blood cells dance, Paul! :drop_of_blood::bubbles:


Handy guide: Using Image Controls in Custom Components
You can always @elementsbot for more help!

added code and I get three circles with coloured borders but NO image

Alright, Paul — time to bring out the big magnifying glass! :detective: Let’s Sherlock this to the finish line.


:magnifying_glass_tilted_right: What Your Test Tells Us

If you see three circles with coloured borders but NO image, that means:

  • The <img> elements are rendering and picking up your CSS/animation just fine.
  • But the src attribute is empty — Elements isn’t replacing {{image1}} with your file path.

And in your test, under <code>{{image1}}</code>, I’ll bet you see nothing or just blank, right?


:thinking: What Causes This?

This means one of two things:

  1. Your image wells (in the inspector) are not set/assigned at all — in the project, the fields are still empty.
  2. There’s a mismatch in the property IDs — your wells are named image1 in properties, but maybe the UI thinks it’s img1 or something else.
  3. Rare: There’s an issue with how the component was saved or exported.
  4. You’re previewing in a way that isn’t picking up changes (sometimes a full quit and reopen of Elements fixes stale properties).

:key: Do This — 3 Quick Steps to Victory

:one: Check Your Inspector

  • Open your component in Elements.
  • Go to the inspector panel where it shows your “RBC Images” group.
  • You should see three blank image wells, each titled “Circle1”, “Circle2”, “Circle3”, matching your property IDs (image1, image2, image3).
  • Drag an image into each well! Any PNG/JPG/SVG is fine — just make sure you see a thumbnail appear.

:two: Double-check Property IDs in your properties file:

"properties": [
  { "title": "Circle1", "id": "image1", "image": {} },
  { "title": "Circle2", "id": "image2", "image": {} },
  { "title": "Circle3", "id": "image3", "image": {} }
]
  • IDs must match exactly what you use in your HTML: {{image1}}, {{image2}}, etc.
  • No extra spaces/characters/case mismatches.

:three: Save and Preview Again

  • After dragging images into the wells, save your project, and re-preview or publish.
  • Check under your <code>{{image1}}</code> section to see if a file path now appears instead of blank.
  • If yes — refresh your browser preview: images should now appear and animate!

:sos_button: If Still Not Working

  • Try a full quit/relaunch of RapidWeaver Elements (sometimes, it caches old settings).
  • Paste a screenshot of your properties panel with the wells/thumbnails in place.
  • Or post your properties JSON + screenshot here — I’ll double-check every detail.

:trophy: Summary

Seeing borders (not the images) = images NOT set in wells!
When a real image is dropped, Elements outputs a working path and you’ll see your tags show real images.


You’re on the home stretch. Drag in those images, hit save, and those blood cells will flow! :drop_of_blood:

Want a quick demo video? Just shout.
Or, DM the component/project to the Realmac Team (Dan & co love a forensic case).


Elements Bot: Now offering “well-filling therapy” for all circle-to-blood-cell transformations.


P.S. If you have images set in the wells but it’s STILL blank, let me know your Elements version—maybe there’s a UI bug and we’ll tag @dan!

Ok now done that and images are now appearing INSIDE bubbles and NOT replacing them

Ah, Paul, we’re SO CLOSE you can practically hear the blood cells singing the victory chorus. :drop_of_blood:

Here’s Exactly What’s Happening

Right now, your <img> images are being placed on top of or inside the old CSS bubbles/circles. This means:

  • The original circles (created by CSS, probably with border-radius/background, etc.) are still there.
  • Your <img> is being layered inside/over/with them—instead of replacing those circles completely.

That’s why you see a blood cell in a translucent circle!


:ambulance: The Cure: Don’t Render the Circles AND Images Together!

Only render the <img> tags where you want an image bubble, and ONLY the <li>/old markup where you want a plain bubble.

:magnifying_glass_tilted_left: Problem Breakdown:

You probably still have HTML like:

<img src="{{image1}}" class="circle circle1" />
<li class="circle circle1"></li>

Or you’re using CSS like:

.circle {
  width: ...
  height: ...
  background: rgba(...);
  border-radius: 50%;
  ...
}

which applies even to <img> tags, so they get a translucent circle behind the image.


:hammer_and_wrench: The Solutions — Pick Yours!

Option 1: Remove Duplicate Circles

Show ONLY your images for those bubbles:

<ul class="circles">
  <img src="{{image1}}" class="circle circle1" />
  <img src="{{image2}}" class="circle circle2" />
  <img src="{{image3}}" class="circle circle3" />
  <li class="circle circle4"></li>
  ...
</ul>

No duplicate <li> for the same “slot” as your images!


Option 2: Make Sure .circle Styles Don’t Apply to <img>

Add a CSS fix so your <img class="circle"> doesn’t get background/border-radius intended for <li> only:

.circles li.circle {
  /* all your animated bubble styling here (background, border-radius, opacity, etc) */
}

/* Remove bubble backgrounds from img */
.circles img.circle {
  background: none !important;
  border-radius: 0 !important;
  /* Remove box-shadows or anything else that causes circles */
}

So only <li> get the “bubble” look—<img>s are pure images!


Option 3: Go All-In on Images for All Bubbles

If you want every circle to be an image, swap all <li>s for <img> tags and assign a different image to each (or duplicate).


:chequered_flag: TL;DR

  • Don’t mix <img> and <li> for the same bubble slot.
  • Update your CSS: Make sure image bubbles don’t get the “circle” style.
  • Result: Only your blood cell image is visible, with NO ghosty circle behind.

:sparkles: Example — Just Images for First 3 Bubbles

<ul class="circles">
  <img src="{{image1}}" class="circle circle1" />
  <img src="{{image2}}" class="circle circle2" />
  <img src="{{image3}}" class="circle circle3" />
  <li class="circle circle4"></li>
  <li class="circle circle5"></li>
  <li class="circle circle6"></li>
  <!-- ...etc -->
</ul>

PLUS, update your CSS:

.circles img.circle {
  background: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

(You can leave animations on .circle.circleX if you want images to move/scale/rotate!)


:police_car_light: Extra Debug: If you want only the image visible and nothing “ghosty” appears, this method guarantees it! :police_car_light:


:raising_hands: Post back when the circles have been vanquished and your animated blood cells are dancing across the stage!
If you want, share a snippet of your CSS and I’ll tweak it right here.

Elements Bot, wielding the ultimate anti-circle laser! :collision:

I can of bot oil on its way! Superb all done we got there in the end! I now have my blood cells firing away. Its a surgical site so don’t you become a surgical robot - apparently they only operate on batteries!