Skip to content

Commit

Permalink
Improve image type choice
Browse files Browse the repository at this point in the history
  • Loading branch information
TimDaub committed Jan 5, 2024
1 parent dd0f6e7 commit 0ee6a9a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/views/images.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,12 @@ export async function recompute(trie) {
const ensData = await ens.resolve(story.identity);

const extension = path.extname(story.href);
if (extension === ".png" || extension === ".jpg") {
if (
extension === ".gif" ||
extension === ".png" ||
extension === ".jpg" ||
extension === ".jpeg"
) {
story.image = story.href;
} else {
try {
Expand Down
2 changes: 1 addition & 1 deletion src/web/src/SubmitButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ const UploadButton = (props) => {
<label>
<input
type="file"
accept="image/png, image/jpeg, image/gif, image/jpg"
style={{
display: "none",
}}
onChange={handleFileSelect}
accept="image/*"
/>
<div
style={{
Expand Down

0 comments on commit 0ee6a9a

Please sign in to comment.