Do force resize in img tag, assume serve is sending the right size.
This commit is contained in:
parent
d4df74a799
commit
d07542b544
4
react-debug/src/App.js
vendored
4
react-debug/src/App.js
vendored
@ -36,7 +36,7 @@ class Album extends React.Component {
|
|||||||
// TODO(wathiede): use coverPhotoMediaItemId and fetch from a
|
// TODO(wathiede): use coverPhotoMediaItemId and fetch from a
|
||||||
// locally cached image.
|
// locally cached image.
|
||||||
return <figure key={ mi.id } className="figure">
|
return <figure key={ mi.id } className="figure">
|
||||||
<img height="256" width="256" src={ `/api/image/${mi.id}?w=256&h=256` } className="mr-3" alt={ mi.filename }/>
|
<img src={ `/api/image/${mi.id}?w=256&h=256` } className="mr-3" alt={ mi.filename }/>
|
||||||
<figcaption className="figure-caption">
|
<figcaption className="figure-caption">
|
||||||
<a key={ mi.id } href={ mi.productUrl }>
|
<a key={ mi.id } href={ mi.productUrl }>
|
||||||
<p className="text-truncate">{ mi.filename}</p>
|
<p className="text-truncate">{ mi.filename}</p>
|
||||||
@ -75,7 +75,7 @@ class AlbumIndex extends React.Component {
|
|||||||
return albums.map((a) => {
|
return albums.map((a) => {
|
||||||
let img = <img src="https://via.placeholder.com/256x128" className="mr-3" alt="unset"/>;
|
let img = <img src="https://via.placeholder.com/256x128" className="mr-3" alt="unset"/>;
|
||||||
if (a.coverPhotoMediaItemId !== undefined) {
|
if (a.coverPhotoMediaItemId !== undefined) {
|
||||||
img = <img height="256" width="256" src={ `/api/image/${a.coverPhotoMediaItemId}?w=256&h=256` } className="mr-3" alt={ a.title }/>
|
img = <img src={ `/api/image/${a.coverPhotoMediaItemId}?w=256&h=256` } className="mr-3" alt={ a.title }/>
|
||||||
}
|
}
|
||||||
|
|
||||||
let figure = <figure key={ a.id } className="figure">
|
let figure = <figure key={ a.id } className="figure">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user