SShortSingh.
Back to feed

Why product photos hit upload limits: decoded size, not file size, drives the 2048px cap

0
·2 views

A product photo can exceed a 10 MB upload limit because its decoded pixel size is large, even when the file itself is small. The author found a 12.4 MB PNG failed while a 240 KB JPEG of the same shoes passed, illustrating that file size and in-memory size differ. Decoded memory scales with width times height times four bytes, so a large PNG can expand to around 96 MB. The author suggests checking both file size and long-edge dimensions in the browser before uploading, and resizing to a 2048px cap without upscaling. The piece also notes format trade-offs, such as WebP for web use, PNG for transparency, and JPEG's effect on pure white backgrounds.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingHacker News ·

Jacob Coxon and Robin Hanson Debate Whether Governments Should Slow Frontier AI

A video debate has been posted on Hacker News featuring Jacob Coxon and Robin Hanson discussing whether governments ought to slow the development of frontier artificial intelligence. The item is hosted on YouTube and linked from a Hacker News discussion thread. At the time of capture, the post had drawn 8 points and 3 comments from readers. The source material provides only the title and metadata, so the specific arguments made by each speaker are not described here.

0
ProgrammingHacker News ·

Essay Argues Paid Advertising Has Become an Extraction Tax on Businesses

A piece published on globalcommercegraph.com, titled "The 98% Slot Machine," argues that paid advertising has evolved into a kind of extraction tax on companies. The essay's central metaphor compares ad spending to a slot machine that returns little to advertisers. The article was shared on Hacker News, where it gathered two points and one comment. The available material offers only the headline, source link, and engagement figures, so the specific claims and evidence behind the essay's argument cannot be confirmed from this summary.

0
ProgrammingDEV Community ·

glab mr view now reports 'unknown' for merge request conflicts while GitLab is still checking

A change to the GitLab CLI (glab) addresses a gap where redirecting mr view output to a file dropped the conflict status shown in the interactive view. The plain-text output now prints a conflicts line with true, false, or unknown, where unknown covers the pending merge-status states unchecked, checking, and preparing. The formatter checks detailed_merge_status before rendering the boolean, since a false value during calculation could mislead scripts. Automation is advised to read the existing JSON fields instead of grepping the text output, and to retry within a bounded timeout when the status is pending. Regression tests cover the true, false, and pending cases, and the change was verified with passing tests and GitLab CI.

0
ProgrammingDEV Community ·

Scanner Dependency Alerts in Code Review: Blind Judges Find No Fully Real Issues

A developer tested whether vulnerability findings from dependency scanners could go directly into an AI code review report without a model verifying them. The reviewer, a Claude Code plugin for reviewing whole backends, runs per-language static tools such as govulncheck, cve-lite and osv-scanner in a Docker image. In the early setup, a model read every advisory and a verifier checked the findings, which cost about 21% of total run cost and sometimes dropped scanner-reported advisories. The replacement used fixed rules that tiered findings by whether the vulnerable code was called or imported, skipping the verifier. Blind Opus judges then reviewed the findings across four private projects, and of 10 distinct issues none was fully real, falling to 0 of 5 after a fix that halved the noise.