replace png with webp
No files matched your search
@@ -0,0 +1,29 @@
|
||||
const mysql = require("mysql");
|
||||
|
||||
const connection = mysql.createConnection({
|
||||
host: "localhost", // Ensure this points to your local database
|
||||
user: "root",
|
||||
password: "",
|
||||
database: "pokedex1",
|
||||
port: 3306,
|
||||
});
|
||||
|
||||
connection.connect((err) => {
|
||||
if (err) {
|
||||
console.error("Error connecting to the database:", err.message);
|
||||
process.exit(1);
|
||||
}
|
||||
console.log("Connected to the local database.");
|
||||
|
||||
const query = "UPDATE pokemon SET image_url = REPLACE(image_url, '.png', '.webp')";
|
||||
console.log("Executing query:", query);
|
||||
|
||||
connection.query(query, (error, results) => {
|
||||
if (error) {
|
||||
console.error("Error updating image URLs:", error.message);
|
||||
} else {
|
||||
console.log("Image URLs updated successfully. Rows affected:", results.affectedRows);
|
||||
}
|
||||
connection.end();
|
||||
});
|
||||
});
|
||||
@@ -7,6 +7,13 @@
|
||||
<link rel="stylesheet" href="style.css" />
|
||||
<script src="./pokemon-detail.js" defer></script>
|
||||
<link rel="icon" href="./assets/pokeball.png" type="image/x-icon">
|
||||
<link rel="preconnect" href="https://example.com" />
|
||||
<link rel="preconnect" href="https://cdn.example.com" />
|
||||
<link rel="preload" as="image" href="./assets/back-to-home.svg" />
|
||||
<link rel="preload" as="image" href="./assets/chevron_left.svg" />
|
||||
<link rel="preload" as="image" href="./assets/chevron_right.svg" />
|
||||
<link rel="preload" as="image" href="./assets/weight.svg" />
|
||||
<link rel="preload" as="image" href="./assets/height.svg" />
|
||||
</head>
|
||||
<body>
|
||||
<main class="detail-main main">
|
||||
|
||||
|
Before Width: | Height: | Size: 199 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 170 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 178 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 97 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 160 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 133 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 125 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 100 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 143 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 130 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 154 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 111 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 111 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 186 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 98 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 152 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 166 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 153 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 131 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 94 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 107 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 183 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 150 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 116 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 145 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 180 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 134 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 150 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 217 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 179 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 137 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 125 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 102 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 170 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 179 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 154 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 194 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 157 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 128 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 152 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 131 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 155 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 139 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 126 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 134 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 106 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 143 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 133 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 126 KiB |
|
After Width: | Height: | Size: 8.3 KiB |