Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GIFS resize to be huge #157

Open
Bracelet-Five opened this issue Jan 25, 2024 · 1 comment
Open

GIFS resize to be huge #157

Bracelet-Five opened this issue Jan 25, 2024 · 1 comment

Comments

@Bracelet-Five
Copy link

I'm not sure if I'm implementing something incorrectly, but the gifs don't pause or start with a button and instead resize to be the width of the whole screen. Any idea what would cause this?

@blankstaticscreen
Copy link

blankstaticscreen commented Feb 6, 2024

this is also happening to me, although i got the gif buttons to work.
but yeah the gif is huge. if you put it inside a div with a set width it'll resize to that width, but i'd like it to just show the image at the image's own dimensions.

here's how the buttons worked for me

<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>webbed site</title>
    <link rel="stylesheet" href="/style.css">
    <script src="https://unpkg.com/freezeframe/dist/freezeframe.min.js"></script>
    
    

  </head>
  
<body>


<button class="start">start</button>
<button class="stop">stop</button>

<img class="my-class-3 imgPixel" style="width:100%;height:auto;" src="https://i.postimg.cc/Rh48cVtP/dancecat-fixed.gif">

<script>
const manual = new Freezeframe('.my-class-3', {
  trigger: false
});

document
  .querySelector('.start')
  .addEventListener('click', () => {
    manual.start();
  });

document
  .querySelector('.stop')
  .addEventListener('click', () => {
    manual.stop();
  });
</script>

<script>new Freezeframe();</script>
</body>
</html>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants