cypress fixture

JavaScript
cy.fixture('users').as('usersJson')  // load data from users.json
cy.fixture('logo.png').then((logo) => {
  // load data from logo.png
})

Source

Also in JavaScript: