mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-09-19 10:14:21 -04:00
13 lines
368 B
JavaScript
13 lines
368 B
JavaScript
export default {
|
|
methods: {
|
|
imageType(image) {
|
|
if (this.$store.getters.getSupportsWebP === true) {
|
|
return image.replace(/\.(png|jpg)/, ".webp");
|
|
} else if (this.$store.getters.getSupportsWebP === false) {
|
|
return image;
|
|
} else {
|
|
return "";
|
|
}
|
|
}
|
|
}
|
|
};
|