WordPress / openverse

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
https://openverse.org
MIT License
254 stars 203 forks source link

Replace `require` with `import` for images on the homepage #2465

Closed obulat closed 1 year ago

obulat commented 1 year ago

Problem

We use require for images on the homepage. require will be deprecated in Nuxt 3.

Description

We should move the hompage_images folder (images only, not the json file) to /static folder, and use the static URLs.

https://github.com/WordPress/openverse/blob/507d7401a774aad70b984ae7237183d510b0de30/frontend/src/components/VHomeGallery/VHomeGallery.vue#L115-L117

Change the code above to

src: `/homepage_images/${imageSet.value.key}/${idx + 1}.png`
sehgxl commented 1 year ago

Hey @WordPress/openverse-maintainers, I would like to work on this issue,

obulat commented 1 year ago

Hey @WordPress/openverse-maintainers, I would like to work on this issue,

@sehgxl , I've added more details to the issue description.

sehgxl commented 1 year ago

@obulat appreciate you adding the details, working on this.