Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

130
Views
How to use Next.js Image with parallax.js?

My site load a big image slowly: https://tikex-dev.com

This is the image: /young-people-dancing-tango-studio.jpg

The challange is, that <img> is created by parallax.js on client side. url is passed as a custom html tag with data-image-src

<section
    className="section-image light ken-burn-center"
    data-parallax="scroll"
    data-image-src="/young-people-dancing-tango-studio.jpg"
    style={{ background: 'transparent' }}
>

then here the js creates the <img>:

(this.$slider = t('<img />').prependTo(this.$mirror))
            : ((this.$slider = a.prependTo(this.$mirror)), (n = !0)),
            this.$mirror
                .addClass('parallax-mirror')
                .css({
                    visibility: 'hidden',
                    zIndex: this.zIndex,
                    position: 'fixed',
                    top: 0,
                    left: 0,
                    overflow: 'hidden',
                })
                .attr('data-source-id', this.$element.attr('id'))

What if image is big? Shall I modify parallax.js, and create a <Image instead of an <img>? It would not do the server side rendering for different dimensions of the image, right?

What approch exist to speed up loading this big image and use it as a background image in a parallax effect?

Shall I convert manually a 'normal' size image, instead of the 15MB?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!