Shares of GoPro Inc. were up more than 7% in after-hours trading Thursday after the maker of action cameras delivered upbeat profits and revenue.

The company posted second-quarter net income of $17.0 million, or 10 cents a share, versus a loss of $51.0 million, or 34 cents a share, in the year-prior quarter. On an adjusted basis, GoPro
GPRO,
+1.92%

earned 12 cents a share, whereas it lost 20 cents per share a year prior. Analysts tracked by FactSet were expecting 4 cents in adjusted earnings per share.

GoPro’s revenue climbed to $250 million from $134 million a year ago, while analysts had been projecting $232 million. Revenue from GoPro’s own site rose 48% to $88 million and made up 35% of total sales.

Cameras with retail prices of at least $300 accounted for 94% of camera revenue in the quarter.

“Strong execution further revealed the benefits of the strategic shifts we’ve made in our business to a more direct-to-consumer, subscription-centric model,” Chief Financial Officer Brian McGee said in a release. “We believe the changes to our business will continue to result in a more predictable and profitable GoPro.”

The company finished the quarter with 1.16 million subscribers, up 23% sequentially. GoPro has 100,000 paying subscribers to its Quik app, which lets people manage and edit their photo and video libraries.

For the third quarter, GoPro expects revenue of $285 million to $295 million and adjusted earnings per share of 17 cents to 21 cents, according to the prepared remarks from GoPro’s earnings call that it released in advance.

“We are comping against July/August 2020 enthusiasm where markets prematurely opened up across North America and Europe,” McGee said in those remarks.

Analysts tracked by FactSet were expecting revenue of $296 million and adjusted earnings per share of 17 cents.

McGee also noted that the company’s outlook implies that units sold will be down about 10% from a year earlier.

“We believe that there is solid demand for our cameras at all price points; however, due to supply constraints and component price increases, we are prioritizing the production of our premium camera products,” he said. “As a result, volumes for our lower-end cameras will be down significantly year-over-year.”

The company now anticipates 25% to 30% revenue growth for the full year, up from its prior expectation of 20% to 25% growth.

Shares of GoPro have dipped 4.9% over the past three months as the S&P 500
SPX,
+0.60%

has risen 6.3%.

Read More